module Network.AWS.Config.Types.Product where
import Network.AWS.Config.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data Compliance = Compliance'
{ _cComplianceContributorCount :: !(Maybe ComplianceContributorCount)
, _cComplianceType :: !(Maybe ComplianceType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
compliance
:: Compliance
compliance =
Compliance'
{ _cComplianceContributorCount = Nothing
, _cComplianceType = Nothing
}
cComplianceContributorCount :: Lens' Compliance (Maybe ComplianceContributorCount)
cComplianceContributorCount = lens _cComplianceContributorCount (\ s a -> s{_cComplianceContributorCount = a});
cComplianceType :: Lens' Compliance (Maybe ComplianceType)
cComplianceType = lens _cComplianceType (\ s a -> s{_cComplianceType = a});
instance FromJSON Compliance where
parseJSON
= withObject "Compliance"
(\ x ->
Compliance' <$>
(x .:? "ComplianceContributorCount") <*>
(x .:? "ComplianceType"))
instance Hashable Compliance
data ComplianceByConfigRule = ComplianceByConfigRule'
{ _cbcrCompliance :: !(Maybe Compliance)
, _cbcrConfigRuleName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
complianceByConfigRule
:: ComplianceByConfigRule
complianceByConfigRule =
ComplianceByConfigRule'
{ _cbcrCompliance = Nothing
, _cbcrConfigRuleName = Nothing
}
cbcrCompliance :: Lens' ComplianceByConfigRule (Maybe Compliance)
cbcrCompliance = lens _cbcrCompliance (\ s a -> s{_cbcrCompliance = a});
cbcrConfigRuleName :: Lens' ComplianceByConfigRule (Maybe Text)
cbcrConfigRuleName = lens _cbcrConfigRuleName (\ s a -> s{_cbcrConfigRuleName = a});
instance FromJSON ComplianceByConfigRule where
parseJSON
= withObject "ComplianceByConfigRule"
(\ x ->
ComplianceByConfigRule' <$>
(x .:? "Compliance") <*> (x .:? "ConfigRuleName"))
instance Hashable ComplianceByConfigRule
data ComplianceByResource = ComplianceByResource'
{ _cbrResourceId :: !(Maybe Text)
, _cbrResourceType :: !(Maybe Text)
, _cbrCompliance :: !(Maybe Compliance)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
complianceByResource
:: ComplianceByResource
complianceByResource =
ComplianceByResource'
{ _cbrResourceId = Nothing
, _cbrResourceType = Nothing
, _cbrCompliance = Nothing
}
cbrResourceId :: Lens' ComplianceByResource (Maybe Text)
cbrResourceId = lens _cbrResourceId (\ s a -> s{_cbrResourceId = a});
cbrResourceType :: Lens' ComplianceByResource (Maybe Text)
cbrResourceType = lens _cbrResourceType (\ s a -> s{_cbrResourceType = a});
cbrCompliance :: Lens' ComplianceByResource (Maybe Compliance)
cbrCompliance = lens _cbrCompliance (\ s a -> s{_cbrCompliance = a});
instance FromJSON ComplianceByResource where
parseJSON
= withObject "ComplianceByResource"
(\ x ->
ComplianceByResource' <$>
(x .:? "ResourceId") <*> (x .:? "ResourceType") <*>
(x .:? "Compliance"))
instance Hashable ComplianceByResource
data ComplianceContributorCount = ComplianceContributorCount'
{ _cccCappedCount :: !(Maybe Int)
, _cccCapExceeded :: !(Maybe Bool)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
complianceContributorCount
:: ComplianceContributorCount
complianceContributorCount =
ComplianceContributorCount'
{ _cccCappedCount = Nothing
, _cccCapExceeded = Nothing
}
cccCappedCount :: Lens' ComplianceContributorCount (Maybe Int)
cccCappedCount = lens _cccCappedCount (\ s a -> s{_cccCappedCount = a});
cccCapExceeded :: Lens' ComplianceContributorCount (Maybe Bool)
cccCapExceeded = lens _cccCapExceeded (\ s a -> s{_cccCapExceeded = a});
instance FromJSON ComplianceContributorCount where
parseJSON
= withObject "ComplianceContributorCount"
(\ x ->
ComplianceContributorCount' <$>
(x .:? "CappedCount") <*> (x .:? "CapExceeded"))
instance Hashable ComplianceContributorCount
data ComplianceSummary = ComplianceSummary'
{ _csComplianceSummaryTimestamp :: !(Maybe POSIX)
, _csCompliantResourceCount :: !(Maybe ComplianceContributorCount)
, _csNonCompliantResourceCount :: !(Maybe ComplianceContributorCount)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
complianceSummary
:: ComplianceSummary
complianceSummary =
ComplianceSummary'
{ _csComplianceSummaryTimestamp = Nothing
, _csCompliantResourceCount = Nothing
, _csNonCompliantResourceCount = Nothing
}
csComplianceSummaryTimestamp :: Lens' ComplianceSummary (Maybe UTCTime)
csComplianceSummaryTimestamp = lens _csComplianceSummaryTimestamp (\ s a -> s{_csComplianceSummaryTimestamp = a}) . mapping _Time;
csCompliantResourceCount :: Lens' ComplianceSummary (Maybe ComplianceContributorCount)
csCompliantResourceCount = lens _csCompliantResourceCount (\ s a -> s{_csCompliantResourceCount = a});
csNonCompliantResourceCount :: Lens' ComplianceSummary (Maybe ComplianceContributorCount)
csNonCompliantResourceCount = lens _csNonCompliantResourceCount (\ s a -> s{_csNonCompliantResourceCount = a});
instance FromJSON ComplianceSummary where
parseJSON
= withObject "ComplianceSummary"
(\ x ->
ComplianceSummary' <$>
(x .:? "ComplianceSummaryTimestamp") <*>
(x .:? "CompliantResourceCount")
<*> (x .:? "NonCompliantResourceCount"))
instance Hashable ComplianceSummary
data ComplianceSummaryByResourceType = ComplianceSummaryByResourceType'
{ _csbrtResourceType :: !(Maybe Text)
, _csbrtComplianceSummary :: !(Maybe ComplianceSummary)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
complianceSummaryByResourceType
:: ComplianceSummaryByResourceType
complianceSummaryByResourceType =
ComplianceSummaryByResourceType'
{ _csbrtResourceType = Nothing
, _csbrtComplianceSummary = Nothing
}
csbrtResourceType :: Lens' ComplianceSummaryByResourceType (Maybe Text)
csbrtResourceType = lens _csbrtResourceType (\ s a -> s{_csbrtResourceType = a});
csbrtComplianceSummary :: Lens' ComplianceSummaryByResourceType (Maybe ComplianceSummary)
csbrtComplianceSummary = lens _csbrtComplianceSummary (\ s a -> s{_csbrtComplianceSummary = a});
instance FromJSON ComplianceSummaryByResourceType
where
parseJSON
= withObject "ComplianceSummaryByResourceType"
(\ x ->
ComplianceSummaryByResourceType' <$>
(x .:? "ResourceType") <*>
(x .:? "ComplianceSummary"))
instance Hashable ComplianceSummaryByResourceType
data ConfigExportDeliveryInfo = ConfigExportDeliveryInfo'
{ _cediLastErrorCode :: !(Maybe Text)
, _cediLastAttemptTime :: !(Maybe POSIX)
, _cediLastSuccessfulTime :: !(Maybe POSIX)
, _cediLastStatus :: !(Maybe DeliveryStatus)
, _cediLastErrorMessage :: !(Maybe Text)
, _cediNextDeliveryTime :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configExportDeliveryInfo
:: ConfigExportDeliveryInfo
configExportDeliveryInfo =
ConfigExportDeliveryInfo'
{ _cediLastErrorCode = Nothing
, _cediLastAttemptTime = Nothing
, _cediLastSuccessfulTime = Nothing
, _cediLastStatus = Nothing
, _cediLastErrorMessage = Nothing
, _cediNextDeliveryTime = Nothing
}
cediLastErrorCode :: Lens' ConfigExportDeliveryInfo (Maybe Text)
cediLastErrorCode = lens _cediLastErrorCode (\ s a -> s{_cediLastErrorCode = a});
cediLastAttemptTime :: Lens' ConfigExportDeliveryInfo (Maybe UTCTime)
cediLastAttemptTime = lens _cediLastAttemptTime (\ s a -> s{_cediLastAttemptTime = a}) . mapping _Time;
cediLastSuccessfulTime :: Lens' ConfigExportDeliveryInfo (Maybe UTCTime)
cediLastSuccessfulTime = lens _cediLastSuccessfulTime (\ s a -> s{_cediLastSuccessfulTime = a}) . mapping _Time;
cediLastStatus :: Lens' ConfigExportDeliveryInfo (Maybe DeliveryStatus)
cediLastStatus = lens _cediLastStatus (\ s a -> s{_cediLastStatus = a});
cediLastErrorMessage :: Lens' ConfigExportDeliveryInfo (Maybe Text)
cediLastErrorMessage = lens _cediLastErrorMessage (\ s a -> s{_cediLastErrorMessage = a});
cediNextDeliveryTime :: Lens' ConfigExportDeliveryInfo (Maybe UTCTime)
cediNextDeliveryTime = lens _cediNextDeliveryTime (\ s a -> s{_cediNextDeliveryTime = a}) . mapping _Time;
instance FromJSON ConfigExportDeliveryInfo where
parseJSON
= withObject "ConfigExportDeliveryInfo"
(\ x ->
ConfigExportDeliveryInfo' <$>
(x .:? "lastErrorCode") <*> (x .:? "lastAttemptTime")
<*> (x .:? "lastSuccessfulTime")
<*> (x .:? "lastStatus")
<*> (x .:? "lastErrorMessage")
<*> (x .:? "nextDeliveryTime"))
instance Hashable ConfigExportDeliveryInfo
data ConfigRule = ConfigRule'
{ _crInputParameters :: !(Maybe Text)
, _crConfigRuleName :: !(Maybe Text)
, _crMaximumExecutionFrequency :: !(Maybe MaximumExecutionFrequency)
, _crConfigRuleId :: !(Maybe Text)
, _crScope :: !(Maybe Scope)
, _crConfigRuleState :: !(Maybe ConfigRuleState)
, _crDescription :: !(Maybe Text)
, _crConfigRuleARN :: !(Maybe Text)
, _crSource :: !Source
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configRule
:: Source
-> ConfigRule
configRule pSource_ =
ConfigRule'
{ _crInputParameters = Nothing
, _crConfigRuleName = Nothing
, _crMaximumExecutionFrequency = Nothing
, _crConfigRuleId = Nothing
, _crScope = Nothing
, _crConfigRuleState = Nothing
, _crDescription = Nothing
, _crConfigRuleARN = Nothing
, _crSource = pSource_
}
crInputParameters :: Lens' ConfigRule (Maybe Text)
crInputParameters = lens _crInputParameters (\ s a -> s{_crInputParameters = a});
crConfigRuleName :: Lens' ConfigRule (Maybe Text)
crConfigRuleName = lens _crConfigRuleName (\ s a -> s{_crConfigRuleName = a});
crMaximumExecutionFrequency :: Lens' ConfigRule (Maybe MaximumExecutionFrequency)
crMaximumExecutionFrequency = lens _crMaximumExecutionFrequency (\ s a -> s{_crMaximumExecutionFrequency = a});
crConfigRuleId :: Lens' ConfigRule (Maybe Text)
crConfigRuleId = lens _crConfigRuleId (\ s a -> s{_crConfigRuleId = a});
crScope :: Lens' ConfigRule (Maybe Scope)
crScope = lens _crScope (\ s a -> s{_crScope = a});
crConfigRuleState :: Lens' ConfigRule (Maybe ConfigRuleState)
crConfigRuleState = lens _crConfigRuleState (\ s a -> s{_crConfigRuleState = a});
crDescription :: Lens' ConfigRule (Maybe Text)
crDescription = lens _crDescription (\ s a -> s{_crDescription = a});
crConfigRuleARN :: Lens' ConfigRule (Maybe Text)
crConfigRuleARN = lens _crConfigRuleARN (\ s a -> s{_crConfigRuleARN = a});
crSource :: Lens' ConfigRule Source
crSource = lens _crSource (\ s a -> s{_crSource = a});
instance FromJSON ConfigRule where
parseJSON
= withObject "ConfigRule"
(\ x ->
ConfigRule' <$>
(x .:? "InputParameters") <*>
(x .:? "ConfigRuleName")
<*> (x .:? "MaximumExecutionFrequency")
<*> (x .:? "ConfigRuleId")
<*> (x .:? "Scope")
<*> (x .:? "ConfigRuleState")
<*> (x .:? "Description")
<*> (x .:? "ConfigRuleArn")
<*> (x .: "Source"))
instance Hashable ConfigRule
instance ToJSON ConfigRule where
toJSON ConfigRule'{..}
= object
(catMaybes
[("InputParameters" .=) <$> _crInputParameters,
("ConfigRuleName" .=) <$> _crConfigRuleName,
("MaximumExecutionFrequency" .=) <$>
_crMaximumExecutionFrequency,
("ConfigRuleId" .=) <$> _crConfigRuleId,
("Scope" .=) <$> _crScope,
("ConfigRuleState" .=) <$> _crConfigRuleState,
("Description" .=) <$> _crDescription,
("ConfigRuleArn" .=) <$> _crConfigRuleARN,
Just ("Source" .= _crSource)])
data ConfigRuleEvaluationStatus = ConfigRuleEvaluationStatus'
{ _cresLastErrorCode :: !(Maybe Text)
, _cresLastFailedEvaluationTime :: !(Maybe POSIX)
, _cresFirstActivatedTime :: !(Maybe POSIX)
, _cresLastSuccessfulEvaluationTime :: !(Maybe POSIX)
, _cresConfigRuleName :: !(Maybe Text)
, _cresLastErrorMessage :: !(Maybe Text)
, _cresConfigRuleId :: !(Maybe Text)
, _cresLastFailedInvocationTime :: !(Maybe POSIX)
, _cresFirstEvaluationStarted :: !(Maybe Bool)
, _cresLastSuccessfulInvocationTime :: !(Maybe POSIX)
, _cresConfigRuleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configRuleEvaluationStatus
:: ConfigRuleEvaluationStatus
configRuleEvaluationStatus =
ConfigRuleEvaluationStatus'
{ _cresLastErrorCode = Nothing
, _cresLastFailedEvaluationTime = Nothing
, _cresFirstActivatedTime = Nothing
, _cresLastSuccessfulEvaluationTime = Nothing
, _cresConfigRuleName = Nothing
, _cresLastErrorMessage = Nothing
, _cresConfigRuleId = Nothing
, _cresLastFailedInvocationTime = Nothing
, _cresFirstEvaluationStarted = Nothing
, _cresLastSuccessfulInvocationTime = Nothing
, _cresConfigRuleARN = Nothing
}
cresLastErrorCode :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresLastErrorCode = lens _cresLastErrorCode (\ s a -> s{_cresLastErrorCode = a});
cresLastFailedEvaluationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastFailedEvaluationTime = lens _cresLastFailedEvaluationTime (\ s a -> s{_cresLastFailedEvaluationTime = a}) . mapping _Time;
cresFirstActivatedTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresFirstActivatedTime = lens _cresFirstActivatedTime (\ s a -> s{_cresFirstActivatedTime = a}) . mapping _Time;
cresLastSuccessfulEvaluationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastSuccessfulEvaluationTime = lens _cresLastSuccessfulEvaluationTime (\ s a -> s{_cresLastSuccessfulEvaluationTime = a}) . mapping _Time;
cresConfigRuleName :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresConfigRuleName = lens _cresConfigRuleName (\ s a -> s{_cresConfigRuleName = a});
cresLastErrorMessage :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresLastErrorMessage = lens _cresLastErrorMessage (\ s a -> s{_cresLastErrorMessage = a});
cresConfigRuleId :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresConfigRuleId = lens _cresConfigRuleId (\ s a -> s{_cresConfigRuleId = a});
cresLastFailedInvocationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastFailedInvocationTime = lens _cresLastFailedInvocationTime (\ s a -> s{_cresLastFailedInvocationTime = a}) . mapping _Time;
cresFirstEvaluationStarted :: Lens' ConfigRuleEvaluationStatus (Maybe Bool)
cresFirstEvaluationStarted = lens _cresFirstEvaluationStarted (\ s a -> s{_cresFirstEvaluationStarted = a});
cresLastSuccessfulInvocationTime :: Lens' ConfigRuleEvaluationStatus (Maybe UTCTime)
cresLastSuccessfulInvocationTime = lens _cresLastSuccessfulInvocationTime (\ s a -> s{_cresLastSuccessfulInvocationTime = a}) . mapping _Time;
cresConfigRuleARN :: Lens' ConfigRuleEvaluationStatus (Maybe Text)
cresConfigRuleARN = lens _cresConfigRuleARN (\ s a -> s{_cresConfigRuleARN = a});
instance FromJSON ConfigRuleEvaluationStatus where
parseJSON
= withObject "ConfigRuleEvaluationStatus"
(\ x ->
ConfigRuleEvaluationStatus' <$>
(x .:? "LastErrorCode") <*>
(x .:? "LastFailedEvaluationTime")
<*> (x .:? "FirstActivatedTime")
<*> (x .:? "LastSuccessfulEvaluationTime")
<*> (x .:? "ConfigRuleName")
<*> (x .:? "LastErrorMessage")
<*> (x .:? "ConfigRuleId")
<*> (x .:? "LastFailedInvocationTime")
<*> (x .:? "FirstEvaluationStarted")
<*> (x .:? "LastSuccessfulInvocationTime")
<*> (x .:? "ConfigRuleArn"))
instance Hashable ConfigRuleEvaluationStatus
newtype ConfigSnapshotDeliveryProperties = ConfigSnapshotDeliveryProperties'
{ _csdpDeliveryFrequency :: Maybe MaximumExecutionFrequency
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configSnapshotDeliveryProperties
:: ConfigSnapshotDeliveryProperties
configSnapshotDeliveryProperties =
ConfigSnapshotDeliveryProperties'
{ _csdpDeliveryFrequency = Nothing
}
csdpDeliveryFrequency :: Lens' ConfigSnapshotDeliveryProperties (Maybe MaximumExecutionFrequency)
csdpDeliveryFrequency = lens _csdpDeliveryFrequency (\ s a -> s{_csdpDeliveryFrequency = a});
instance FromJSON ConfigSnapshotDeliveryProperties
where
parseJSON
= withObject "ConfigSnapshotDeliveryProperties"
(\ x ->
ConfigSnapshotDeliveryProperties' <$>
(x .:? "deliveryFrequency"))
instance Hashable ConfigSnapshotDeliveryProperties
instance ToJSON ConfigSnapshotDeliveryProperties
where
toJSON ConfigSnapshotDeliveryProperties'{..}
= object
(catMaybes
[("deliveryFrequency" .=) <$>
_csdpDeliveryFrequency])
data ConfigStreamDeliveryInfo = ConfigStreamDeliveryInfo'
{ _csdiLastErrorCode :: !(Maybe Text)
, _csdiLastStatusChangeTime :: !(Maybe POSIX)
, _csdiLastStatus :: !(Maybe DeliveryStatus)
, _csdiLastErrorMessage :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configStreamDeliveryInfo
:: ConfigStreamDeliveryInfo
configStreamDeliveryInfo =
ConfigStreamDeliveryInfo'
{ _csdiLastErrorCode = Nothing
, _csdiLastStatusChangeTime = Nothing
, _csdiLastStatus = Nothing
, _csdiLastErrorMessage = Nothing
}
csdiLastErrorCode :: Lens' ConfigStreamDeliveryInfo (Maybe Text)
csdiLastErrorCode = lens _csdiLastErrorCode (\ s a -> s{_csdiLastErrorCode = a});
csdiLastStatusChangeTime :: Lens' ConfigStreamDeliveryInfo (Maybe UTCTime)
csdiLastStatusChangeTime = lens _csdiLastStatusChangeTime (\ s a -> s{_csdiLastStatusChangeTime = a}) . mapping _Time;
csdiLastStatus :: Lens' ConfigStreamDeliveryInfo (Maybe DeliveryStatus)
csdiLastStatus = lens _csdiLastStatus (\ s a -> s{_csdiLastStatus = a});
csdiLastErrorMessage :: Lens' ConfigStreamDeliveryInfo (Maybe Text)
csdiLastErrorMessage = lens _csdiLastErrorMessage (\ s a -> s{_csdiLastErrorMessage = a});
instance FromJSON ConfigStreamDeliveryInfo where
parseJSON
= withObject "ConfigStreamDeliveryInfo"
(\ x ->
ConfigStreamDeliveryInfo' <$>
(x .:? "lastErrorCode") <*>
(x .:? "lastStatusChangeTime")
<*> (x .:? "lastStatus")
<*> (x .:? "lastErrorMessage"))
instance Hashable ConfigStreamDeliveryInfo
data ConfigurationItem = ConfigurationItem'
{ _ciResourceId :: !(Maybe Text)
, _ciResourceType :: !(Maybe ResourceType)
, _ciConfigurationStateId :: !(Maybe Text)
, _ciArn :: !(Maybe Text)
, _ciResourceName :: !(Maybe Text)
, _ciResourceCreationTime :: !(Maybe POSIX)
, _ciConfigurationItemStatus :: !(Maybe ConfigurationItemStatus)
, _ciConfigurationItemCaptureTime :: !(Maybe POSIX)
, _ciAccountId :: !(Maybe Text)
, _ciAvailabilityZone :: !(Maybe Text)
, _ciRelationships :: !(Maybe [Relationship])
, _ciVersion :: !(Maybe Text)
, _ciAwsRegion :: !(Maybe Text)
, _ciRelatedEvents :: !(Maybe [Text])
, _ciConfiguration :: !(Maybe Text)
, _ciConfigurationItemMD5Hash :: !(Maybe Text)
, _ciTags :: !(Maybe (Map Text Text))
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configurationItem
:: ConfigurationItem
configurationItem =
ConfigurationItem'
{ _ciResourceId = Nothing
, _ciResourceType = Nothing
, _ciConfigurationStateId = Nothing
, _ciArn = Nothing
, _ciResourceName = Nothing
, _ciResourceCreationTime = Nothing
, _ciConfigurationItemStatus = Nothing
, _ciConfigurationItemCaptureTime = Nothing
, _ciAccountId = Nothing
, _ciAvailabilityZone = Nothing
, _ciRelationships = Nothing
, _ciVersion = Nothing
, _ciAwsRegion = Nothing
, _ciRelatedEvents = Nothing
, _ciConfiguration = Nothing
, _ciConfigurationItemMD5Hash = Nothing
, _ciTags = Nothing
}
ciResourceId :: Lens' ConfigurationItem (Maybe Text)
ciResourceId = lens _ciResourceId (\ s a -> s{_ciResourceId = a});
ciResourceType :: Lens' ConfigurationItem (Maybe ResourceType)
ciResourceType = lens _ciResourceType (\ s a -> s{_ciResourceType = a});
ciConfigurationStateId :: Lens' ConfigurationItem (Maybe Text)
ciConfigurationStateId = lens _ciConfigurationStateId (\ s a -> s{_ciConfigurationStateId = a});
ciArn :: Lens' ConfigurationItem (Maybe Text)
ciArn = lens _ciArn (\ s a -> s{_ciArn = a});
ciResourceName :: Lens' ConfigurationItem (Maybe Text)
ciResourceName = lens _ciResourceName (\ s a -> s{_ciResourceName = a});
ciResourceCreationTime :: Lens' ConfigurationItem (Maybe UTCTime)
ciResourceCreationTime = lens _ciResourceCreationTime (\ s a -> s{_ciResourceCreationTime = a}) . mapping _Time;
ciConfigurationItemStatus :: Lens' ConfigurationItem (Maybe ConfigurationItemStatus)
ciConfigurationItemStatus = lens _ciConfigurationItemStatus (\ s a -> s{_ciConfigurationItemStatus = a});
ciConfigurationItemCaptureTime :: Lens' ConfigurationItem (Maybe UTCTime)
ciConfigurationItemCaptureTime = lens _ciConfigurationItemCaptureTime (\ s a -> s{_ciConfigurationItemCaptureTime = a}) . mapping _Time;
ciAccountId :: Lens' ConfigurationItem (Maybe Text)
ciAccountId = lens _ciAccountId (\ s a -> s{_ciAccountId = a});
ciAvailabilityZone :: Lens' ConfigurationItem (Maybe Text)
ciAvailabilityZone = lens _ciAvailabilityZone (\ s a -> s{_ciAvailabilityZone = a});
ciRelationships :: Lens' ConfigurationItem [Relationship]
ciRelationships = lens _ciRelationships (\ s a -> s{_ciRelationships = a}) . _Default . _Coerce;
ciVersion :: Lens' ConfigurationItem (Maybe Text)
ciVersion = lens _ciVersion (\ s a -> s{_ciVersion = a});
ciAwsRegion :: Lens' ConfigurationItem (Maybe Text)
ciAwsRegion = lens _ciAwsRegion (\ s a -> s{_ciAwsRegion = a});
ciRelatedEvents :: Lens' ConfigurationItem [Text]
ciRelatedEvents = lens _ciRelatedEvents (\ s a -> s{_ciRelatedEvents = a}) . _Default . _Coerce;
ciConfiguration :: Lens' ConfigurationItem (Maybe Text)
ciConfiguration = lens _ciConfiguration (\ s a -> s{_ciConfiguration = a});
ciConfigurationItemMD5Hash :: Lens' ConfigurationItem (Maybe Text)
ciConfigurationItemMD5Hash = lens _ciConfigurationItemMD5Hash (\ s a -> s{_ciConfigurationItemMD5Hash = a});
ciTags :: Lens' ConfigurationItem (HashMap Text Text)
ciTags = lens _ciTags (\ s a -> s{_ciTags = a}) . _Default . _Map;
instance FromJSON ConfigurationItem where
parseJSON
= withObject "ConfigurationItem"
(\ x ->
ConfigurationItem' <$>
(x .:? "resourceId") <*> (x .:? "resourceType") <*>
(x .:? "configurationStateId")
<*> (x .:? "arn")
<*> (x .:? "resourceName")
<*> (x .:? "resourceCreationTime")
<*> (x .:? "configurationItemStatus")
<*> (x .:? "configurationItemCaptureTime")
<*> (x .:? "accountId")
<*> (x .:? "availabilityZone")
<*> (x .:? "relationships" .!= mempty)
<*> (x .:? "version")
<*> (x .:? "awsRegion")
<*> (x .:? "relatedEvents" .!= mempty)
<*> (x .:? "configuration")
<*> (x .:? "configurationItemMD5Hash")
<*> (x .:? "tags" .!= mempty))
instance Hashable ConfigurationItem
data ConfigurationRecorder = ConfigurationRecorder'
{ _crName :: !(Maybe Text)
, _crRecordingGroup :: !(Maybe RecordingGroup)
, _crRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configurationRecorder
:: ConfigurationRecorder
configurationRecorder =
ConfigurationRecorder'
{ _crName = Nothing
, _crRecordingGroup = Nothing
, _crRoleARN = Nothing
}
crName :: Lens' ConfigurationRecorder (Maybe Text)
crName = lens _crName (\ s a -> s{_crName = a});
crRecordingGroup :: Lens' ConfigurationRecorder (Maybe RecordingGroup)
crRecordingGroup = lens _crRecordingGroup (\ s a -> s{_crRecordingGroup = a});
crRoleARN :: Lens' ConfigurationRecorder (Maybe Text)
crRoleARN = lens _crRoleARN (\ s a -> s{_crRoleARN = a});
instance FromJSON ConfigurationRecorder where
parseJSON
= withObject "ConfigurationRecorder"
(\ x ->
ConfigurationRecorder' <$>
(x .:? "name") <*> (x .:? "recordingGroup") <*>
(x .:? "roleARN"))
instance Hashable ConfigurationRecorder
instance ToJSON ConfigurationRecorder where
toJSON ConfigurationRecorder'{..}
= object
(catMaybes
[("name" .=) <$> _crName,
("recordingGroup" .=) <$> _crRecordingGroup,
("roleARN" .=) <$> _crRoleARN])
data ConfigurationRecorderStatus = ConfigurationRecorderStatus'
{ _crsLastErrorCode :: !(Maybe Text)
, _crsLastStopTime :: !(Maybe POSIX)
, _crsLastStatusChangeTime :: !(Maybe POSIX)
, _crsRecording :: !(Maybe Bool)
, _crsLastStatus :: !(Maybe RecorderStatus)
, _crsLastErrorMessage :: !(Maybe Text)
, _crsName :: !(Maybe Text)
, _crsLastStartTime :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
configurationRecorderStatus
:: ConfigurationRecorderStatus
configurationRecorderStatus =
ConfigurationRecorderStatus'
{ _crsLastErrorCode = Nothing
, _crsLastStopTime = Nothing
, _crsLastStatusChangeTime = Nothing
, _crsRecording = Nothing
, _crsLastStatus = Nothing
, _crsLastErrorMessage = Nothing
, _crsName = Nothing
, _crsLastStartTime = Nothing
}
crsLastErrorCode :: Lens' ConfigurationRecorderStatus (Maybe Text)
crsLastErrorCode = lens _crsLastErrorCode (\ s a -> s{_crsLastErrorCode = a});
crsLastStopTime :: Lens' ConfigurationRecorderStatus (Maybe UTCTime)
crsLastStopTime = lens _crsLastStopTime (\ s a -> s{_crsLastStopTime = a}) . mapping _Time;
crsLastStatusChangeTime :: Lens' ConfigurationRecorderStatus (Maybe UTCTime)
crsLastStatusChangeTime = lens _crsLastStatusChangeTime (\ s a -> s{_crsLastStatusChangeTime = a}) . mapping _Time;
crsRecording :: Lens' ConfigurationRecorderStatus (Maybe Bool)
crsRecording = lens _crsRecording (\ s a -> s{_crsRecording = a});
crsLastStatus :: Lens' ConfigurationRecorderStatus (Maybe RecorderStatus)
crsLastStatus = lens _crsLastStatus (\ s a -> s{_crsLastStatus = a});
crsLastErrorMessage :: Lens' ConfigurationRecorderStatus (Maybe Text)
crsLastErrorMessage = lens _crsLastErrorMessage (\ s a -> s{_crsLastErrorMessage = a});
crsName :: Lens' ConfigurationRecorderStatus (Maybe Text)
crsName = lens _crsName (\ s a -> s{_crsName = a});
crsLastStartTime :: Lens' ConfigurationRecorderStatus (Maybe UTCTime)
crsLastStartTime = lens _crsLastStartTime (\ s a -> s{_crsLastStartTime = a}) . mapping _Time;
instance FromJSON ConfigurationRecorderStatus where
parseJSON
= withObject "ConfigurationRecorderStatus"
(\ x ->
ConfigurationRecorderStatus' <$>
(x .:? "lastErrorCode") <*> (x .:? "lastStopTime")
<*> (x .:? "lastStatusChangeTime")
<*> (x .:? "recording")
<*> (x .:? "lastStatus")
<*> (x .:? "lastErrorMessage")
<*> (x .:? "name")
<*> (x .:? "lastStartTime"))
instance Hashable ConfigurationRecorderStatus
data DeliveryChannel = DeliveryChannel'
{ _dcS3KeyPrefix :: !(Maybe Text)
, _dcSnsTopicARN :: !(Maybe Text)
, _dcName :: !(Maybe Text)
, _dcConfigSnapshotDeliveryProperties :: !(Maybe ConfigSnapshotDeliveryProperties)
, _dcS3BucketName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deliveryChannel
:: DeliveryChannel
deliveryChannel =
DeliveryChannel'
{ _dcS3KeyPrefix = Nothing
, _dcSnsTopicARN = Nothing
, _dcName = Nothing
, _dcConfigSnapshotDeliveryProperties = Nothing
, _dcS3BucketName = Nothing
}
dcS3KeyPrefix :: Lens' DeliveryChannel (Maybe Text)
dcS3KeyPrefix = lens _dcS3KeyPrefix (\ s a -> s{_dcS3KeyPrefix = a});
dcSnsTopicARN :: Lens' DeliveryChannel (Maybe Text)
dcSnsTopicARN = lens _dcSnsTopicARN (\ s a -> s{_dcSnsTopicARN = a});
dcName :: Lens' DeliveryChannel (Maybe Text)
dcName = lens _dcName (\ s a -> s{_dcName = a});
dcConfigSnapshotDeliveryProperties :: Lens' DeliveryChannel (Maybe ConfigSnapshotDeliveryProperties)
dcConfigSnapshotDeliveryProperties = lens _dcConfigSnapshotDeliveryProperties (\ s a -> s{_dcConfigSnapshotDeliveryProperties = a});
dcS3BucketName :: Lens' DeliveryChannel (Maybe Text)
dcS3BucketName = lens _dcS3BucketName (\ s a -> s{_dcS3BucketName = a});
instance FromJSON DeliveryChannel where
parseJSON
= withObject "DeliveryChannel"
(\ x ->
DeliveryChannel' <$>
(x .:? "s3KeyPrefix") <*> (x .:? "snsTopicARN") <*>
(x .:? "name")
<*> (x .:? "configSnapshotDeliveryProperties")
<*> (x .:? "s3BucketName"))
instance Hashable DeliveryChannel
instance ToJSON DeliveryChannel where
toJSON DeliveryChannel'{..}
= object
(catMaybes
[("s3KeyPrefix" .=) <$> _dcS3KeyPrefix,
("snsTopicARN" .=) <$> _dcSnsTopicARN,
("name" .=) <$> _dcName,
("configSnapshotDeliveryProperties" .=) <$>
_dcConfigSnapshotDeliveryProperties,
("s3BucketName" .=) <$> _dcS3BucketName])
data DeliveryChannelStatus = DeliveryChannelStatus'
{ _dcsConfigSnapshotDeliveryInfo :: !(Maybe ConfigExportDeliveryInfo)
, _dcsConfigStreamDeliveryInfo :: !(Maybe ConfigStreamDeliveryInfo)
, _dcsConfigHistoryDeliveryInfo :: !(Maybe ConfigExportDeliveryInfo)
, _dcsName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deliveryChannelStatus
:: DeliveryChannelStatus
deliveryChannelStatus =
DeliveryChannelStatus'
{ _dcsConfigSnapshotDeliveryInfo = Nothing
, _dcsConfigStreamDeliveryInfo = Nothing
, _dcsConfigHistoryDeliveryInfo = Nothing
, _dcsName = Nothing
}
dcsConfigSnapshotDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigExportDeliveryInfo)
dcsConfigSnapshotDeliveryInfo = lens _dcsConfigSnapshotDeliveryInfo (\ s a -> s{_dcsConfigSnapshotDeliveryInfo = a});
dcsConfigStreamDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigStreamDeliveryInfo)
dcsConfigStreamDeliveryInfo = lens _dcsConfigStreamDeliveryInfo (\ s a -> s{_dcsConfigStreamDeliveryInfo = a});
dcsConfigHistoryDeliveryInfo :: Lens' DeliveryChannelStatus (Maybe ConfigExportDeliveryInfo)
dcsConfigHistoryDeliveryInfo = lens _dcsConfigHistoryDeliveryInfo (\ s a -> s{_dcsConfigHistoryDeliveryInfo = a});
dcsName :: Lens' DeliveryChannelStatus (Maybe Text)
dcsName = lens _dcsName (\ s a -> s{_dcsName = a});
instance FromJSON DeliveryChannelStatus where
parseJSON
= withObject "DeliveryChannelStatus"
(\ x ->
DeliveryChannelStatus' <$>
(x .:? "configSnapshotDeliveryInfo") <*>
(x .:? "configStreamDeliveryInfo")
<*> (x .:? "configHistoryDeliveryInfo")
<*> (x .:? "name"))
instance Hashable DeliveryChannelStatus
data Evaluation = Evaluation'
{ _eAnnotation :: !(Maybe Text)
, _eComplianceResourceType :: !Text
, _eComplianceResourceId :: !Text
, _eComplianceType :: !ComplianceType
, _eOrderingTimestamp :: !POSIX
} deriving (Eq,Read,Show,Data,Typeable,Generic)
evaluation
:: Text
-> Text
-> ComplianceType
-> UTCTime
-> Evaluation
evaluation pComplianceResourceType_ pComplianceResourceId_ pComplianceType_ pOrderingTimestamp_ =
Evaluation'
{ _eAnnotation = Nothing
, _eComplianceResourceType = pComplianceResourceType_
, _eComplianceResourceId = pComplianceResourceId_
, _eComplianceType = pComplianceType_
, _eOrderingTimestamp = _Time # pOrderingTimestamp_
}
eAnnotation :: Lens' Evaluation (Maybe Text)
eAnnotation = lens _eAnnotation (\ s a -> s{_eAnnotation = a});
eComplianceResourceType :: Lens' Evaluation Text
eComplianceResourceType = lens _eComplianceResourceType (\ s a -> s{_eComplianceResourceType = a});
eComplianceResourceId :: Lens' Evaluation Text
eComplianceResourceId = lens _eComplianceResourceId (\ s a -> s{_eComplianceResourceId = a});
eComplianceType :: Lens' Evaluation ComplianceType
eComplianceType = lens _eComplianceType (\ s a -> s{_eComplianceType = a});
eOrderingTimestamp :: Lens' Evaluation UTCTime
eOrderingTimestamp = lens _eOrderingTimestamp (\ s a -> s{_eOrderingTimestamp = a}) . _Time;
instance FromJSON Evaluation where
parseJSON
= withObject "Evaluation"
(\ x ->
Evaluation' <$>
(x .:? "Annotation") <*>
(x .: "ComplianceResourceType")
<*> (x .: "ComplianceResourceId")
<*> (x .: "ComplianceType")
<*> (x .: "OrderingTimestamp"))
instance Hashable Evaluation
instance ToJSON Evaluation where
toJSON Evaluation'{..}
= object
(catMaybes
[("Annotation" .=) <$> _eAnnotation,
Just
("ComplianceResourceType" .=
_eComplianceResourceType),
Just
("ComplianceResourceId" .= _eComplianceResourceId),
Just ("ComplianceType" .= _eComplianceType),
Just ("OrderingTimestamp" .= _eOrderingTimestamp)])
data EvaluationResult = EvaluationResult'
{ _erEvaluationResultIdentifier :: !(Maybe EvaluationResultIdentifier)
, _erAnnotation :: !(Maybe Text)
, _erConfigRuleInvokedTime :: !(Maybe POSIX)
, _erResultRecordedTime :: !(Maybe POSIX)
, _erResultToken :: !(Maybe Text)
, _erComplianceType :: !(Maybe ComplianceType)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
evaluationResult
:: EvaluationResult
evaluationResult =
EvaluationResult'
{ _erEvaluationResultIdentifier = Nothing
, _erAnnotation = Nothing
, _erConfigRuleInvokedTime = Nothing
, _erResultRecordedTime = Nothing
, _erResultToken = Nothing
, _erComplianceType = Nothing
}
erEvaluationResultIdentifier :: Lens' EvaluationResult (Maybe EvaluationResultIdentifier)
erEvaluationResultIdentifier = lens _erEvaluationResultIdentifier (\ s a -> s{_erEvaluationResultIdentifier = a});
erAnnotation :: Lens' EvaluationResult (Maybe Text)
erAnnotation = lens _erAnnotation (\ s a -> s{_erAnnotation = a});
erConfigRuleInvokedTime :: Lens' EvaluationResult (Maybe UTCTime)
erConfigRuleInvokedTime = lens _erConfigRuleInvokedTime (\ s a -> s{_erConfigRuleInvokedTime = a}) . mapping _Time;
erResultRecordedTime :: Lens' EvaluationResult (Maybe UTCTime)
erResultRecordedTime = lens _erResultRecordedTime (\ s a -> s{_erResultRecordedTime = a}) . mapping _Time;
erResultToken :: Lens' EvaluationResult (Maybe Text)
erResultToken = lens _erResultToken (\ s a -> s{_erResultToken = a});
erComplianceType :: Lens' EvaluationResult (Maybe ComplianceType)
erComplianceType = lens _erComplianceType (\ s a -> s{_erComplianceType = a});
instance FromJSON EvaluationResult where
parseJSON
= withObject "EvaluationResult"
(\ x ->
EvaluationResult' <$>
(x .:? "EvaluationResultIdentifier") <*>
(x .:? "Annotation")
<*> (x .:? "ConfigRuleInvokedTime")
<*> (x .:? "ResultRecordedTime")
<*> (x .:? "ResultToken")
<*> (x .:? "ComplianceType"))
instance Hashable EvaluationResult
data EvaluationResultIdentifier = EvaluationResultIdentifier'
{ _eriEvaluationResultQualifier :: !(Maybe EvaluationResultQualifier)
, _eriOrderingTimestamp :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
evaluationResultIdentifier
:: EvaluationResultIdentifier
evaluationResultIdentifier =
EvaluationResultIdentifier'
{ _eriEvaluationResultQualifier = Nothing
, _eriOrderingTimestamp = Nothing
}
eriEvaluationResultQualifier :: Lens' EvaluationResultIdentifier (Maybe EvaluationResultQualifier)
eriEvaluationResultQualifier = lens _eriEvaluationResultQualifier (\ s a -> s{_eriEvaluationResultQualifier = a});
eriOrderingTimestamp :: Lens' EvaluationResultIdentifier (Maybe UTCTime)
eriOrderingTimestamp = lens _eriOrderingTimestamp (\ s a -> s{_eriOrderingTimestamp = a}) . mapping _Time;
instance FromJSON EvaluationResultIdentifier where
parseJSON
= withObject "EvaluationResultIdentifier"
(\ x ->
EvaluationResultIdentifier' <$>
(x .:? "EvaluationResultQualifier") <*>
(x .:? "OrderingTimestamp"))
instance Hashable EvaluationResultIdentifier
data EvaluationResultQualifier = EvaluationResultQualifier'
{ _erqResourceId :: !(Maybe Text)
, _erqResourceType :: !(Maybe Text)
, _erqConfigRuleName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
evaluationResultQualifier
:: EvaluationResultQualifier
evaluationResultQualifier =
EvaluationResultQualifier'
{ _erqResourceId = Nothing
, _erqResourceType = Nothing
, _erqConfigRuleName = Nothing
}
erqResourceId :: Lens' EvaluationResultQualifier (Maybe Text)
erqResourceId = lens _erqResourceId (\ s a -> s{_erqResourceId = a});
erqResourceType :: Lens' EvaluationResultQualifier (Maybe Text)
erqResourceType = lens _erqResourceType (\ s a -> s{_erqResourceType = a});
erqConfigRuleName :: Lens' EvaluationResultQualifier (Maybe Text)
erqConfigRuleName = lens _erqConfigRuleName (\ s a -> s{_erqConfigRuleName = a});
instance FromJSON EvaluationResultQualifier where
parseJSON
= withObject "EvaluationResultQualifier"
(\ x ->
EvaluationResultQualifier' <$>
(x .:? "ResourceId") <*> (x .:? "ResourceType") <*>
(x .:? "ConfigRuleName"))
instance Hashable EvaluationResultQualifier
data RecordingGroup = RecordingGroup'
{ _rgAllSupported :: !(Maybe Bool)
, _rgIncludeGlobalResourceTypes :: !(Maybe Bool)
, _rgResourceTypes :: !(Maybe [ResourceType])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
recordingGroup
:: RecordingGroup
recordingGroup =
RecordingGroup'
{ _rgAllSupported = Nothing
, _rgIncludeGlobalResourceTypes = Nothing
, _rgResourceTypes = Nothing
}
rgAllSupported :: Lens' RecordingGroup (Maybe Bool)
rgAllSupported = lens _rgAllSupported (\ s a -> s{_rgAllSupported = a});
rgIncludeGlobalResourceTypes :: Lens' RecordingGroup (Maybe Bool)
rgIncludeGlobalResourceTypes = lens _rgIncludeGlobalResourceTypes (\ s a -> s{_rgIncludeGlobalResourceTypes = a});
rgResourceTypes :: Lens' RecordingGroup [ResourceType]
rgResourceTypes = lens _rgResourceTypes (\ s a -> s{_rgResourceTypes = a}) . _Default . _Coerce;
instance FromJSON RecordingGroup where
parseJSON
= withObject "RecordingGroup"
(\ x ->
RecordingGroup' <$>
(x .:? "allSupported") <*>
(x .:? "includeGlobalResourceTypes")
<*> (x .:? "resourceTypes" .!= mempty))
instance Hashable RecordingGroup
instance ToJSON RecordingGroup where
toJSON RecordingGroup'{..}
= object
(catMaybes
[("allSupported" .=) <$> _rgAllSupported,
("includeGlobalResourceTypes" .=) <$>
_rgIncludeGlobalResourceTypes,
("resourceTypes" .=) <$> _rgResourceTypes])
data Relationship = Relationship'
{ _rResourceId :: !(Maybe Text)
, _rResourceType :: !(Maybe ResourceType)
, _rResourceName :: !(Maybe Text)
, _rRelationshipName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
relationship
:: Relationship
relationship =
Relationship'
{ _rResourceId = Nothing
, _rResourceType = Nothing
, _rResourceName = Nothing
, _rRelationshipName = Nothing
}
rResourceId :: Lens' Relationship (Maybe Text)
rResourceId = lens _rResourceId (\ s a -> s{_rResourceId = a});
rResourceType :: Lens' Relationship (Maybe ResourceType)
rResourceType = lens _rResourceType (\ s a -> s{_rResourceType = a});
rResourceName :: Lens' Relationship (Maybe Text)
rResourceName = lens _rResourceName (\ s a -> s{_rResourceName = a});
rRelationshipName :: Lens' Relationship (Maybe Text)
rRelationshipName = lens _rRelationshipName (\ s a -> s{_rRelationshipName = a});
instance FromJSON Relationship where
parseJSON
= withObject "Relationship"
(\ x ->
Relationship' <$>
(x .:? "resourceId") <*> (x .:? "resourceType") <*>
(x .:? "resourceName")
<*> (x .:? "relationshipName"))
instance Hashable Relationship
data ResourceIdentifier = ResourceIdentifier'
{ _riResourceId :: !(Maybe Text)
, _riResourceType :: !(Maybe ResourceType)
, _riResourceName :: !(Maybe Text)
, _riResourceDeletionTime :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resourceIdentifier
:: ResourceIdentifier
resourceIdentifier =
ResourceIdentifier'
{ _riResourceId = Nothing
, _riResourceType = Nothing
, _riResourceName = Nothing
, _riResourceDeletionTime = Nothing
}
riResourceId :: Lens' ResourceIdentifier (Maybe Text)
riResourceId = lens _riResourceId (\ s a -> s{_riResourceId = a});
riResourceType :: Lens' ResourceIdentifier (Maybe ResourceType)
riResourceType = lens _riResourceType (\ s a -> s{_riResourceType = a});
riResourceName :: Lens' ResourceIdentifier (Maybe Text)
riResourceName = lens _riResourceName (\ s a -> s{_riResourceName = a});
riResourceDeletionTime :: Lens' ResourceIdentifier (Maybe UTCTime)
riResourceDeletionTime = lens _riResourceDeletionTime (\ s a -> s{_riResourceDeletionTime = a}) . mapping _Time;
instance FromJSON ResourceIdentifier where
parseJSON
= withObject "ResourceIdentifier"
(\ x ->
ResourceIdentifier' <$>
(x .:? "resourceId") <*> (x .:? "resourceType") <*>
(x .:? "resourceName")
<*> (x .:? "resourceDeletionTime"))
instance Hashable ResourceIdentifier
data Scope = Scope'
{ _sComplianceResourceTypes :: !(Maybe [Text])
, _sComplianceResourceId :: !(Maybe Text)
, _sTagValue :: !(Maybe Text)
, _sTagKey :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
scope
:: Scope
scope =
Scope'
{ _sComplianceResourceTypes = Nothing
, _sComplianceResourceId = Nothing
, _sTagValue = Nothing
, _sTagKey = Nothing
}
sComplianceResourceTypes :: Lens' Scope [Text]
sComplianceResourceTypes = lens _sComplianceResourceTypes (\ s a -> s{_sComplianceResourceTypes = a}) . _Default . _Coerce;
sComplianceResourceId :: Lens' Scope (Maybe Text)
sComplianceResourceId = lens _sComplianceResourceId (\ s a -> s{_sComplianceResourceId = a});
sTagValue :: Lens' Scope (Maybe Text)
sTagValue = lens _sTagValue (\ s a -> s{_sTagValue = a});
sTagKey :: Lens' Scope (Maybe Text)
sTagKey = lens _sTagKey (\ s a -> s{_sTagKey = a});
instance FromJSON Scope where
parseJSON
= withObject "Scope"
(\ x ->
Scope' <$>
(x .:? "ComplianceResourceTypes" .!= mempty) <*>
(x .:? "ComplianceResourceId")
<*> (x .:? "TagValue")
<*> (x .:? "TagKey"))
instance Hashable Scope
instance ToJSON Scope where
toJSON Scope'{..}
= object
(catMaybes
[("ComplianceResourceTypes" .=) <$>
_sComplianceResourceTypes,
("ComplianceResourceId" .=) <$>
_sComplianceResourceId,
("TagValue" .=) <$> _sTagValue,
("TagKey" .=) <$> _sTagKey])
data Source = Source'
{ _sSourceIdentifier :: !(Maybe Text)
, _sOwner :: !(Maybe Owner)
, _sSourceDetails :: !(Maybe [SourceDetail])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
source
:: Source
source =
Source'
{ _sSourceIdentifier = Nothing
, _sOwner = Nothing
, _sSourceDetails = Nothing
}
sSourceIdentifier :: Lens' Source (Maybe Text)
sSourceIdentifier = lens _sSourceIdentifier (\ s a -> s{_sSourceIdentifier = a});
sOwner :: Lens' Source (Maybe Owner)
sOwner = lens _sOwner (\ s a -> s{_sOwner = a});
sSourceDetails :: Lens' Source [SourceDetail]
sSourceDetails = lens _sSourceDetails (\ s a -> s{_sSourceDetails = a}) . _Default . _Coerce;
instance FromJSON Source where
parseJSON
= withObject "Source"
(\ x ->
Source' <$>
(x .:? "SourceIdentifier") <*> (x .:? "Owner") <*>
(x .:? "SourceDetails" .!= mempty))
instance Hashable Source
instance ToJSON Source where
toJSON Source'{..}
= object
(catMaybes
[("SourceIdentifier" .=) <$> _sSourceIdentifier,
("Owner" .=) <$> _sOwner,
("SourceDetails" .=) <$> _sSourceDetails])
data SourceDetail = SourceDetail'
{ _sdMessageType :: !(Maybe MessageType)
, _sdEventSource :: !(Maybe EventSource)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
sourceDetail
:: SourceDetail
sourceDetail =
SourceDetail'
{ _sdMessageType = Nothing
, _sdEventSource = Nothing
}
sdMessageType :: Lens' SourceDetail (Maybe MessageType)
sdMessageType = lens _sdMessageType (\ s a -> s{_sdMessageType = a});
sdEventSource :: Lens' SourceDetail (Maybe EventSource)
sdEventSource = lens _sdEventSource (\ s a -> s{_sdEventSource = a});
instance FromJSON SourceDetail where
parseJSON
= withObject "SourceDetail"
(\ x ->
SourceDetail' <$>
(x .:? "MessageType") <*> (x .:? "EventSource"))
instance Hashable SourceDetail
instance ToJSON SourceDetail where
toJSON SourceDetail'{..}
= object
(catMaybes
[("MessageType" .=) <$> _sdMessageType,
("EventSource" .=) <$> _sdEventSource])