module Network.AWS.Inspector.Types.Product where
import Network.AWS.Inspector.Types.Sum
import Network.AWS.Prelude
data Agent = Agent'
{ _aTelemetry :: !(Maybe [Telemetry])
, _aAutoScalingGroup :: !(Maybe Text)
, _aAgentHealthCode :: !(Maybe Text)
, _aAssessmentARN :: !(Maybe Text)
, _aAgentId :: !(Maybe Text)
, _aAccountId :: !(Maybe Text)
, _aAgentHealthDetails :: !(Maybe Text)
, _aAgentHealth :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
agent
:: Agent
agent =
Agent'
{ _aTelemetry = Nothing
, _aAutoScalingGroup = Nothing
, _aAgentHealthCode = Nothing
, _aAssessmentARN = Nothing
, _aAgentId = Nothing
, _aAccountId = Nothing
, _aAgentHealthDetails = Nothing
, _aAgentHealth = Nothing
}
aTelemetry :: Lens' Agent [Telemetry]
aTelemetry = lens _aTelemetry (\ s a -> s{_aTelemetry = a}) . _Default . _Coerce;
aAutoScalingGroup :: Lens' Agent (Maybe Text)
aAutoScalingGroup = lens _aAutoScalingGroup (\ s a -> s{_aAutoScalingGroup = a});
aAgentHealthCode :: Lens' Agent (Maybe Text)
aAgentHealthCode = lens _aAgentHealthCode (\ s a -> s{_aAgentHealthCode = a});
aAssessmentARN :: Lens' Agent (Maybe Text)
aAssessmentARN = lens _aAssessmentARN (\ s a -> s{_aAssessmentARN = a});
aAgentId :: Lens' Agent (Maybe Text)
aAgentId = lens _aAgentId (\ s a -> s{_aAgentId = a});
aAccountId :: Lens' Agent (Maybe Text)
aAccountId = lens _aAccountId (\ s a -> s{_aAccountId = a});
aAgentHealthDetails :: Lens' Agent (Maybe Text)
aAgentHealthDetails = lens _aAgentHealthDetails (\ s a -> s{_aAgentHealthDetails = a});
aAgentHealth :: Lens' Agent (Maybe Text)
aAgentHealth = lens _aAgentHealth (\ s a -> s{_aAgentHealth = a});
instance FromJSON Agent where
parseJSON
= withObject "Agent"
(\ x ->
Agent' <$>
(x .:? "telemetry" .!= mempty) <*>
(x .:? "autoScalingGroup")
<*> (x .:? "agentHealthCode")
<*> (x .:? "assessmentArn")
<*> (x .:? "agentId")
<*> (x .:? "accountId")
<*> (x .:? "agentHealthDetails")
<*> (x .:? "agentHealth"))
data AgentPreview = AgentPreview'
{ _apAutoScalingGroup :: !(Maybe Text)
, _apAgentId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
agentPreview
:: AgentPreview
agentPreview =
AgentPreview'
{ _apAutoScalingGroup = Nothing
, _apAgentId = Nothing
}
apAutoScalingGroup :: Lens' AgentPreview (Maybe Text)
apAutoScalingGroup = lens _apAutoScalingGroup (\ s a -> s{_apAutoScalingGroup = a});
apAgentId :: Lens' AgentPreview (Maybe Text)
apAgentId = lens _apAgentId (\ s a -> s{_apAgentId = a});
instance FromJSON AgentPreview where
parseJSON
= withObject "AgentPreview"
(\ x ->
AgentPreview' <$>
(x .:? "autoScalingGroup") <*> (x .:? "agentId"))
newtype AgentsFilter = AgentsFilter'
{ _afAgentHealthList :: Maybe [Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
agentsFilter
:: AgentsFilter
agentsFilter =
AgentsFilter'
{ _afAgentHealthList = Nothing
}
afAgentHealthList :: Lens' AgentsFilter [Text]
afAgentHealthList = lens _afAgentHealthList (\ s a -> s{_afAgentHealthList = a}) . _Default . _Coerce;
instance ToJSON AgentsFilter where
toJSON AgentsFilter'{..}
= object
(catMaybes
[("agentHealthList" .=) <$> _afAgentHealthList])
data Application = Application'
{ _aApplicationARN :: !(Maybe Text)
, _aResourceGroupARN :: !(Maybe Text)
, _aApplicationName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
application
:: Application
application =
Application'
{ _aApplicationARN = Nothing
, _aResourceGroupARN = Nothing
, _aApplicationName = Nothing
}
aApplicationARN :: Lens' Application (Maybe Text)
aApplicationARN = lens _aApplicationARN (\ s a -> s{_aApplicationARN = a});
aResourceGroupARN :: Lens' Application (Maybe Text)
aResourceGroupARN = lens _aResourceGroupARN (\ s a -> s{_aResourceGroupARN = a});
aApplicationName :: Lens' Application (Maybe Text)
aApplicationName = lens _aApplicationName (\ s a -> s{_aApplicationName = a});
instance FromJSON Application where
parseJSON
= withObject "Application"
(\ x ->
Application' <$>
(x .:? "applicationArn") <*>
(x .:? "resourceGroupArn")
<*> (x .:? "applicationName"))
newtype ApplicationsFilter = ApplicationsFilter'
{ _afApplicationNamePatterns :: Maybe [Text]
} deriving (Eq,Read,Show,Data,Typeable,Generic)
applicationsFilter
:: ApplicationsFilter
applicationsFilter =
ApplicationsFilter'
{ _afApplicationNamePatterns = Nothing
}
afApplicationNamePatterns :: Lens' ApplicationsFilter [Text]
afApplicationNamePatterns = lens _afApplicationNamePatterns (\ s a -> s{_afApplicationNamePatterns = a}) . _Default . _Coerce;
instance ToJSON ApplicationsFilter where
toJSON ApplicationsFilter'{..}
= object
(catMaybes
[("applicationNamePatterns" .=) <$>
_afApplicationNamePatterns])
data Assessment = Assessment'
{ _assDataCollected :: !(Maybe Bool)
, _assApplicationARN :: !(Maybe Text)
, _assStartTime :: !(Maybe POSIX)
, _assAssessmentARN :: !(Maybe Text)
, _assUserAttributesForFindings :: !(Maybe [Attribute])
, _assFailureMessage :: !(Maybe Text)
, _assAssessmentState :: !(Maybe Text)
, _assEndTime :: !(Maybe POSIX)
, _assDurationInSeconds :: !(Maybe Int)
, _assAssessmentName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
assessment
:: Assessment
assessment =
Assessment'
{ _assDataCollected = Nothing
, _assApplicationARN = Nothing
, _assStartTime = Nothing
, _assAssessmentARN = Nothing
, _assUserAttributesForFindings = Nothing
, _assFailureMessage = Nothing
, _assAssessmentState = Nothing
, _assEndTime = Nothing
, _assDurationInSeconds = Nothing
, _assAssessmentName = Nothing
}
assDataCollected :: Lens' Assessment (Maybe Bool)
assDataCollected = lens _assDataCollected (\ s a -> s{_assDataCollected = a});
assApplicationARN :: Lens' Assessment (Maybe Text)
assApplicationARN = lens _assApplicationARN (\ s a -> s{_assApplicationARN = a});
assStartTime :: Lens' Assessment (Maybe UTCTime)
assStartTime = lens _assStartTime (\ s a -> s{_assStartTime = a}) . mapping _Time;
assAssessmentARN :: Lens' Assessment (Maybe Text)
assAssessmentARN = lens _assAssessmentARN (\ s a -> s{_assAssessmentARN = a});
assUserAttributesForFindings :: Lens' Assessment [Attribute]
assUserAttributesForFindings = lens _assUserAttributesForFindings (\ s a -> s{_assUserAttributesForFindings = a}) . _Default . _Coerce;
assFailureMessage :: Lens' Assessment (Maybe Text)
assFailureMessage = lens _assFailureMessage (\ s a -> s{_assFailureMessage = a});
assAssessmentState :: Lens' Assessment (Maybe Text)
assAssessmentState = lens _assAssessmentState (\ s a -> s{_assAssessmentState = a});
assEndTime :: Lens' Assessment (Maybe UTCTime)
assEndTime = lens _assEndTime (\ s a -> s{_assEndTime = a}) . mapping _Time;
assDurationInSeconds :: Lens' Assessment (Maybe Int)
assDurationInSeconds = lens _assDurationInSeconds (\ s a -> s{_assDurationInSeconds = a});
assAssessmentName :: Lens' Assessment (Maybe Text)
assAssessmentName = lens _assAssessmentName (\ s a -> s{_assAssessmentName = a});
instance FromJSON Assessment where
parseJSON
= withObject "Assessment"
(\ x ->
Assessment' <$>
(x .:? "dataCollected") <*> (x .:? "applicationArn")
<*> (x .:? "startTime")
<*> (x .:? "assessmentArn")
<*> (x .:? "userAttributesForFindings" .!= mempty)
<*> (x .:? "failureMessage")
<*> (x .:? "assessmentState")
<*> (x .:? "endTime")
<*> (x .:? "durationInSeconds")
<*> (x .:? "assessmentName"))
data AssessmentsFilter = AssessmentsFilter'
{ _afDataCollected :: !(Maybe Bool)
, _afAssessmentStates :: !(Maybe [Text])
, _afStartTimeRange :: !(Maybe TimestampRange)
, _afAssessmentNamePatterns :: !(Maybe [Text])
, _afEndTimeRange :: !(Maybe TimestampRange)
, _afDurationRange :: !(Maybe DurationRange)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
assessmentsFilter
:: AssessmentsFilter
assessmentsFilter =
AssessmentsFilter'
{ _afDataCollected = Nothing
, _afAssessmentStates = Nothing
, _afStartTimeRange = Nothing
, _afAssessmentNamePatterns = Nothing
, _afEndTimeRange = Nothing
, _afDurationRange = Nothing
}
afDataCollected :: Lens' AssessmentsFilter (Maybe Bool)
afDataCollected = lens _afDataCollected (\ s a -> s{_afDataCollected = a});
afAssessmentStates :: Lens' AssessmentsFilter [Text]
afAssessmentStates = lens _afAssessmentStates (\ s a -> s{_afAssessmentStates = a}) . _Default . _Coerce;
afStartTimeRange :: Lens' AssessmentsFilter (Maybe TimestampRange)
afStartTimeRange = lens _afStartTimeRange (\ s a -> s{_afStartTimeRange = a});
afAssessmentNamePatterns :: Lens' AssessmentsFilter [Text]
afAssessmentNamePatterns = lens _afAssessmentNamePatterns (\ s a -> s{_afAssessmentNamePatterns = a}) . _Default . _Coerce;
afEndTimeRange :: Lens' AssessmentsFilter (Maybe TimestampRange)
afEndTimeRange = lens _afEndTimeRange (\ s a -> s{_afEndTimeRange = a});
afDurationRange :: Lens' AssessmentsFilter (Maybe DurationRange)
afDurationRange = lens _afDurationRange (\ s a -> s{_afDurationRange = a});
instance ToJSON AssessmentsFilter where
toJSON AssessmentsFilter'{..}
= object
(catMaybes
[("dataCollected" .=) <$> _afDataCollected,
("assessmentStates" .=) <$> _afAssessmentStates,
("startTimeRange" .=) <$> _afStartTimeRange,
("assessmentNamePatterns" .=) <$>
_afAssessmentNamePatterns,
("endTimeRange" .=) <$> _afEndTimeRange,
("durationRange" .=) <$> _afDurationRange])
data Attribute = Attribute'
{ _aValue :: !(Maybe Text)
, _aKey :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
attribute
:: Attribute
attribute =
Attribute'
{ _aValue = Nothing
, _aKey = Nothing
}
aValue :: Lens' Attribute (Maybe Text)
aValue = lens _aValue (\ s a -> s{_aValue = a});
aKey :: Lens' Attribute (Maybe Text)
aKey = lens _aKey (\ s a -> s{_aKey = a});
instance FromJSON Attribute where
parseJSON
= withObject "Attribute"
(\ x ->
Attribute' <$> (x .:? "value") <*> (x .:? "key"))
instance ToJSON Attribute where
toJSON Attribute'{..}
= object
(catMaybes
[("value" .=) <$> _aValue, ("key" .=) <$> _aKey])
data DurationRange = DurationRange'
{ _drMaximum :: !(Maybe Int)
, _drMinimum :: !(Maybe Int)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
durationRange
:: DurationRange
durationRange =
DurationRange'
{ _drMaximum = Nothing
, _drMinimum = Nothing
}
drMaximum :: Lens' DurationRange (Maybe Int)
drMaximum = lens _drMaximum (\ s a -> s{_drMaximum = a});
drMinimum :: Lens' DurationRange (Maybe Int)
drMinimum = lens _drMinimum (\ s a -> s{_drMinimum = a});
instance ToJSON DurationRange where
toJSON DurationRange'{..}
= object
(catMaybes
[("maximum" .=) <$> _drMaximum,
("minimum" .=) <$> _drMinimum])
data Finding = Finding'
{ _fAutoScalingGroup :: !(Maybe Text)
, _fFinding :: !(Maybe LocalizedText)
, _fSeverity :: !(Maybe Text)
, _fUserAttributes :: !(Maybe [Attribute])
, _fRuleName :: !(Maybe Text)
, _fAgentId :: !(Maybe Text)
, _fRunARN :: !(Maybe Text)
, _fAttributes :: !(Maybe [Attribute])
, _fRulesPackageARN :: !(Maybe Text)
, _fFindingARN :: !(Maybe Text)
, _fDescription :: !(Maybe LocalizedText)
, _fRecommendation :: !(Maybe LocalizedText)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
finding
:: Finding
finding =
Finding'
{ _fAutoScalingGroup = Nothing
, _fFinding = Nothing
, _fSeverity = Nothing
, _fUserAttributes = Nothing
, _fRuleName = Nothing
, _fAgentId = Nothing
, _fRunARN = Nothing
, _fAttributes = Nothing
, _fRulesPackageARN = Nothing
, _fFindingARN = Nothing
, _fDescription = Nothing
, _fRecommendation = Nothing
}
fAutoScalingGroup :: Lens' Finding (Maybe Text)
fAutoScalingGroup = lens _fAutoScalingGroup (\ s a -> s{_fAutoScalingGroup = a});
fFinding :: Lens' Finding (Maybe LocalizedText)
fFinding = lens _fFinding (\ s a -> s{_fFinding = a});
fSeverity :: Lens' Finding (Maybe Text)
fSeverity = lens _fSeverity (\ s a -> s{_fSeverity = a});
fUserAttributes :: Lens' Finding [Attribute]
fUserAttributes = lens _fUserAttributes (\ s a -> s{_fUserAttributes = a}) . _Default . _Coerce;
fRuleName :: Lens' Finding (Maybe Text)
fRuleName = lens _fRuleName (\ s a -> s{_fRuleName = a});
fAgentId :: Lens' Finding (Maybe Text)
fAgentId = lens _fAgentId (\ s a -> s{_fAgentId = a});
fRunARN :: Lens' Finding (Maybe Text)
fRunARN = lens _fRunARN (\ s a -> s{_fRunARN = a});
fAttributes :: Lens' Finding [Attribute]
fAttributes = lens _fAttributes (\ s a -> s{_fAttributes = a}) . _Default . _Coerce;
fRulesPackageARN :: Lens' Finding (Maybe Text)
fRulesPackageARN = lens _fRulesPackageARN (\ s a -> s{_fRulesPackageARN = a});
fFindingARN :: Lens' Finding (Maybe Text)
fFindingARN = lens _fFindingARN (\ s a -> s{_fFindingARN = a});
fDescription :: Lens' Finding (Maybe LocalizedText)
fDescription = lens _fDescription (\ s a -> s{_fDescription = a});
fRecommendation :: Lens' Finding (Maybe LocalizedText)
fRecommendation = lens _fRecommendation (\ s a -> s{_fRecommendation = a});
instance FromJSON Finding where
parseJSON
= withObject "Finding"
(\ x ->
Finding' <$>
(x .:? "autoScalingGroup") <*> (x .:? "finding") <*>
(x .:? "severity")
<*> (x .:? "userAttributes" .!= mempty)
<*> (x .:? "ruleName")
<*> (x .:? "agentId")
<*> (x .:? "runArn")
<*> (x .:? "attributes" .!= mempty)
<*> (x .:? "rulesPackageArn")
<*> (x .:? "findingArn")
<*> (x .:? "description")
<*> (x .:? "recommendation"))
data FindingsFilter = FindingsFilter'
{ _ffRuleNames :: !(Maybe [Text])
, _ffUserAttributes :: !(Maybe [Attribute])
, _ffRulesPackageARNs :: !(Maybe [Text])
, _ffAttributes :: !(Maybe [Attribute])
, _ffSeverities :: !(Maybe [Text])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
findingsFilter
:: FindingsFilter
findingsFilter =
FindingsFilter'
{ _ffRuleNames = Nothing
, _ffUserAttributes = Nothing
, _ffRulesPackageARNs = Nothing
, _ffAttributes = Nothing
, _ffSeverities = Nothing
}
ffRuleNames :: Lens' FindingsFilter [Text]
ffRuleNames = lens _ffRuleNames (\ s a -> s{_ffRuleNames = a}) . _Default . _Coerce;
ffUserAttributes :: Lens' FindingsFilter [Attribute]
ffUserAttributes = lens _ffUserAttributes (\ s a -> s{_ffUserAttributes = a}) . _Default . _Coerce;
ffRulesPackageARNs :: Lens' FindingsFilter [Text]
ffRulesPackageARNs = lens _ffRulesPackageARNs (\ s a -> s{_ffRulesPackageARNs = a}) . _Default . _Coerce;
ffAttributes :: Lens' FindingsFilter [Attribute]
ffAttributes = lens _ffAttributes (\ s a -> s{_ffAttributes = a}) . _Default . _Coerce;
ffSeverities :: Lens' FindingsFilter [Text]
ffSeverities = lens _ffSeverities (\ s a -> s{_ffSeverities = a}) . _Default . _Coerce;
instance ToJSON FindingsFilter where
toJSON FindingsFilter'{..}
= object
(catMaybes
[("ruleNames" .=) <$> _ffRuleNames,
("userAttributes" .=) <$> _ffUserAttributes,
("rulesPackageArns" .=) <$> _ffRulesPackageARNs,
("attributes" .=) <$> _ffAttributes,
("severities" .=) <$> _ffSeverities])
data LocalizedText = LocalizedText'
{ _ltKey :: !(Maybe LocalizedTextKey)
, _ltParameters :: !(Maybe [Parameter])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
localizedText
:: LocalizedText
localizedText =
LocalizedText'
{ _ltKey = Nothing
, _ltParameters = Nothing
}
ltKey :: Lens' LocalizedText (Maybe LocalizedTextKey)
ltKey = lens _ltKey (\ s a -> s{_ltKey = a});
ltParameters :: Lens' LocalizedText [Parameter]
ltParameters = lens _ltParameters (\ s a -> s{_ltParameters = a}) . _Default . _Coerce;
instance FromJSON LocalizedText where
parseJSON
= withObject "LocalizedText"
(\ x ->
LocalizedText' <$>
(x .:? "key") <*> (x .:? "parameters" .!= mempty))
instance ToJSON LocalizedText where
toJSON LocalizedText'{..}
= object
(catMaybes
[("key" .=) <$> _ltKey,
("parameters" .=) <$> _ltParameters])
data LocalizedTextKey = LocalizedTextKey'
{ _ltkFacility :: !(Maybe Text)
, _ltkId :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
localizedTextKey
:: LocalizedTextKey
localizedTextKey =
LocalizedTextKey'
{ _ltkFacility = Nothing
, _ltkId = Nothing
}
ltkFacility :: Lens' LocalizedTextKey (Maybe Text)
ltkFacility = lens _ltkFacility (\ s a -> s{_ltkFacility = a});
ltkId :: Lens' LocalizedTextKey (Maybe Text)
ltkId = lens _ltkId (\ s a -> s{_ltkId = a});
instance FromJSON LocalizedTextKey where
parseJSON
= withObject "LocalizedTextKey"
(\ x ->
LocalizedTextKey' <$>
(x .:? "facility") <*> (x .:? "id"))
instance ToJSON LocalizedTextKey where
toJSON LocalizedTextKey'{..}
= object
(catMaybes
[("facility" .=) <$> _ltkFacility,
("id" .=) <$> _ltkId])
data MessageTypeTelemetry = MessageTypeTelemetry'
{ _mttDataSize :: !(Maybe Integer)
, _mttMessageType :: !(Maybe Text)
, _mttCount :: !(Maybe Integer)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
messageTypeTelemetry
:: MessageTypeTelemetry
messageTypeTelemetry =
MessageTypeTelemetry'
{ _mttDataSize = Nothing
, _mttMessageType = Nothing
, _mttCount = Nothing
}
mttDataSize :: Lens' MessageTypeTelemetry (Maybe Integer)
mttDataSize = lens _mttDataSize (\ s a -> s{_mttDataSize = a});
mttMessageType :: Lens' MessageTypeTelemetry (Maybe Text)
mttMessageType = lens _mttMessageType (\ s a -> s{_mttMessageType = a});
mttCount :: Lens' MessageTypeTelemetry (Maybe Integer)
mttCount = lens _mttCount (\ s a -> s{_mttCount = a});
instance FromJSON MessageTypeTelemetry where
parseJSON
= withObject "MessageTypeTelemetry"
(\ x ->
MessageTypeTelemetry' <$>
(x .:? "dataSize") <*> (x .:? "messageType") <*>
(x .:? "count"))
data Parameter = Parameter'
{ _pValue :: !(Maybe Text)
, _pName :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
parameter
:: Parameter
parameter =
Parameter'
{ _pValue = Nothing
, _pName = Nothing
}
pValue :: Lens' Parameter (Maybe Text)
pValue = lens _pValue (\ s a -> s{_pValue = a});
pName :: Lens' Parameter (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a});
instance FromJSON Parameter where
parseJSON
= withObject "Parameter"
(\ x ->
Parameter' <$> (x .:? "value") <*> (x .:? "name"))
instance ToJSON Parameter where
toJSON Parameter'{..}
= object
(catMaybes
[("value" .=) <$> _pValue, ("name" .=) <$> _pName])
data ResourceGroup = ResourceGroup'
{ _rgResourceGroupTags :: !(Maybe Text)
, _rgResourceGroupARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
resourceGroup
:: ResourceGroup
resourceGroup =
ResourceGroup'
{ _rgResourceGroupTags = Nothing
, _rgResourceGroupARN = Nothing
}
rgResourceGroupTags :: Lens' ResourceGroup (Maybe Text)
rgResourceGroupTags = lens _rgResourceGroupTags (\ s a -> s{_rgResourceGroupTags = a});
rgResourceGroupARN :: Lens' ResourceGroup (Maybe Text)
rgResourceGroupARN = lens _rgResourceGroupARN (\ s a -> s{_rgResourceGroupARN = a});
instance FromJSON ResourceGroup where
parseJSON
= withObject "ResourceGroup"
(\ x ->
ResourceGroup' <$>
(x .:? "resourceGroupTags") <*>
(x .:? "resourceGroupArn"))
data RulesPackage = RulesPackage'
{ _rpVersion :: !(Maybe Text)
, _rpRulesPackageARN :: !(Maybe Text)
, _rpRulesPackageName :: !(Maybe Text)
, _rpDescription :: !(Maybe LocalizedText)
, _rpProvider :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
rulesPackage
:: RulesPackage
rulesPackage =
RulesPackage'
{ _rpVersion = Nothing
, _rpRulesPackageARN = Nothing
, _rpRulesPackageName = Nothing
, _rpDescription = Nothing
, _rpProvider = Nothing
}
rpVersion :: Lens' RulesPackage (Maybe Text)
rpVersion = lens _rpVersion (\ s a -> s{_rpVersion = a});
rpRulesPackageARN :: Lens' RulesPackage (Maybe Text)
rpRulesPackageARN = lens _rpRulesPackageARN (\ s a -> s{_rpRulesPackageARN = a});
rpRulesPackageName :: Lens' RulesPackage (Maybe Text)
rpRulesPackageName = lens _rpRulesPackageName (\ s a -> s{_rpRulesPackageName = a});
rpDescription :: Lens' RulesPackage (Maybe LocalizedText)
rpDescription = lens _rpDescription (\ s a -> s{_rpDescription = a});
rpProvider :: Lens' RulesPackage (Maybe Text)
rpProvider = lens _rpProvider (\ s a -> s{_rpProvider = a});
instance FromJSON RulesPackage where
parseJSON
= withObject "RulesPackage"
(\ x ->
RulesPackage' <$>
(x .:? "version") <*> (x .:? "rulesPackageArn") <*>
(x .:? "rulesPackageName")
<*> (x .:? "description")
<*> (x .:? "provider"))
data Run = Run'
{ _runCreationTime :: !(Maybe POSIX)
, _runRulesPackages :: !(Maybe [Text])
, _runAssessmentARN :: !(Maybe Text)
, _runRunState :: !(Maybe Text)
, _runRunName :: !(Maybe Text)
, _runCompletionTime :: !(Maybe POSIX)
, _runRunARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
run
:: Run
run =
Run'
{ _runCreationTime = Nothing
, _runRulesPackages = Nothing
, _runAssessmentARN = Nothing
, _runRunState = Nothing
, _runRunName = Nothing
, _runCompletionTime = Nothing
, _runRunARN = Nothing
}
runCreationTime :: Lens' Run (Maybe UTCTime)
runCreationTime = lens _runCreationTime (\ s a -> s{_runCreationTime = a}) . mapping _Time;
runRulesPackages :: Lens' Run [Text]
runRulesPackages = lens _runRulesPackages (\ s a -> s{_runRulesPackages = a}) . _Default . _Coerce;
runAssessmentARN :: Lens' Run (Maybe Text)
runAssessmentARN = lens _runAssessmentARN (\ s a -> s{_runAssessmentARN = a});
runRunState :: Lens' Run (Maybe Text)
runRunState = lens _runRunState (\ s a -> s{_runRunState = a});
runRunName :: Lens' Run (Maybe Text)
runRunName = lens _runRunName (\ s a -> s{_runRunName = a});
runCompletionTime :: Lens' Run (Maybe UTCTime)
runCompletionTime = lens _runCompletionTime (\ s a -> s{_runCompletionTime = a}) . mapping _Time;
runRunARN :: Lens' Run (Maybe Text)
runRunARN = lens _runRunARN (\ s a -> s{_runRunARN = a});
instance FromJSON Run where
parseJSON
= withObject "Run"
(\ x ->
Run' <$>
(x .:? "creationTime") <*>
(x .:? "rulesPackages" .!= mempty)
<*> (x .:? "assessmentArn")
<*> (x .:? "runState")
<*> (x .:? "runName")
<*> (x .:? "completionTime")
<*> (x .:? "runArn"))
data RunsFilter = RunsFilter'
{ _rfCreationTime :: !(Maybe TimestampRange)
, _rfRulesPackages :: !(Maybe [Text])
, _rfRunStates :: !(Maybe [Text])
, _rfRunNamePatterns :: !(Maybe [Text])
, _rfCompletionTime :: !(Maybe TimestampRange)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
runsFilter
:: RunsFilter
runsFilter =
RunsFilter'
{ _rfCreationTime = Nothing
, _rfRulesPackages = Nothing
, _rfRunStates = Nothing
, _rfRunNamePatterns = Nothing
, _rfCompletionTime = Nothing
}
rfCreationTime :: Lens' RunsFilter (Maybe TimestampRange)
rfCreationTime = lens _rfCreationTime (\ s a -> s{_rfCreationTime = a});
rfRulesPackages :: Lens' RunsFilter [Text]
rfRulesPackages = lens _rfRulesPackages (\ s a -> s{_rfRulesPackages = a}) . _Default . _Coerce;
rfRunStates :: Lens' RunsFilter [Text]
rfRunStates = lens _rfRunStates (\ s a -> s{_rfRunStates = a}) . _Default . _Coerce;
rfRunNamePatterns :: Lens' RunsFilter [Text]
rfRunNamePatterns = lens _rfRunNamePatterns (\ s a -> s{_rfRunNamePatterns = a}) . _Default . _Coerce;
rfCompletionTime :: Lens' RunsFilter (Maybe TimestampRange)
rfCompletionTime = lens _rfCompletionTime (\ s a -> s{_rfCompletionTime = a});
instance ToJSON RunsFilter where
toJSON RunsFilter'{..}
= object
(catMaybes
[("creationTime" .=) <$> _rfCreationTime,
("rulesPackages" .=) <$> _rfRulesPackages,
("runStates" .=) <$> _rfRunStates,
("runNamePatterns" .=) <$> _rfRunNamePatterns,
("completionTime" .=) <$> _rfCompletionTime])
data Tag = Tag'
{ _tagValue :: !(Maybe Text)
, _tagKey :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
tag
:: Tag
tag =
Tag'
{ _tagValue = Nothing
, _tagKey = Nothing
}
tagValue :: Lens' Tag (Maybe Text)
tagValue = lens _tagValue (\ s a -> s{_tagValue = a});
tagKey :: Lens' Tag (Maybe Text)
tagKey = lens _tagKey (\ s a -> s{_tagKey = a});
instance FromJSON Tag where
parseJSON
= withObject "Tag"
(\ x -> Tag' <$> (x .:? "Value") <*> (x .:? "Key"))
instance ToJSON Tag where
toJSON Tag'{..}
= object
(catMaybes
[("Value" .=) <$> _tagValue, ("Key" .=) <$> _tagKey])
data Telemetry = Telemetry'
{ _tStatus :: !(Maybe Text)
, _tMessageTypeTelemetries :: !(Maybe [MessageTypeTelemetry])
} deriving (Eq,Read,Show,Data,Typeable,Generic)
telemetry
:: Telemetry
telemetry =
Telemetry'
{ _tStatus = Nothing
, _tMessageTypeTelemetries = Nothing
}
tStatus :: Lens' Telemetry (Maybe Text)
tStatus = lens _tStatus (\ s a -> s{_tStatus = a});
tMessageTypeTelemetries :: Lens' Telemetry [MessageTypeTelemetry]
tMessageTypeTelemetries = lens _tMessageTypeTelemetries (\ s a -> s{_tMessageTypeTelemetries = a}) . _Default . _Coerce;
instance FromJSON Telemetry where
parseJSON
= withObject "Telemetry"
(\ x ->
Telemetry' <$>
(x .:? "status") <*>
(x .:? "messageTypeTelemetries" .!= mempty))
data TimestampRange = TimestampRange'
{ _trMaximum :: !(Maybe POSIX)
, _trMinimum :: !(Maybe POSIX)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
timestampRange
:: TimestampRange
timestampRange =
TimestampRange'
{ _trMaximum = Nothing
, _trMinimum = Nothing
}
trMaximum :: Lens' TimestampRange (Maybe UTCTime)
trMaximum = lens _trMaximum (\ s a -> s{_trMaximum = a}) . mapping _Time;
trMinimum :: Lens' TimestampRange (Maybe UTCTime)
trMinimum = lens _trMinimum (\ s a -> s{_trMinimum = a}) . mapping _Time;
instance ToJSON TimestampRange where
toJSON TimestampRange'{..}
= object
(catMaybes
[("maximum" .=) <$> _trMaximum,
("minimum" .=) <$> _trMinimum])