{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.GuardDuty.Types.Product where
import Network.AWS.GuardDuty.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AWSAPICallAction = AWSAPICallAction'
{ _aacaRemoteIPDetails :: !(Maybe RemoteIPDetails)
, _aacaCallerType :: !(Maybe Text)
, _aacaDomainDetails :: !(Maybe DomainDetails)
, _aacaServiceName :: !(Maybe Text)
, _aacaAPI :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
awsAPICallAction
:: AWSAPICallAction
awsAPICallAction =
AWSAPICallAction'
{ _aacaRemoteIPDetails = Nothing
, _aacaCallerType = Nothing
, _aacaDomainDetails = Nothing
, _aacaServiceName = Nothing
, _aacaAPI = Nothing
}
aacaRemoteIPDetails :: Lens' AWSAPICallAction (Maybe RemoteIPDetails)
aacaRemoteIPDetails = lens _aacaRemoteIPDetails (\ s a -> s{_aacaRemoteIPDetails = a})
aacaCallerType :: Lens' AWSAPICallAction (Maybe Text)
aacaCallerType = lens _aacaCallerType (\ s a -> s{_aacaCallerType = a})
aacaDomainDetails :: Lens' AWSAPICallAction (Maybe DomainDetails)
aacaDomainDetails = lens _aacaDomainDetails (\ s a -> s{_aacaDomainDetails = a})
aacaServiceName :: Lens' AWSAPICallAction (Maybe Text)
aacaServiceName = lens _aacaServiceName (\ s a -> s{_aacaServiceName = a})
aacaAPI :: Lens' AWSAPICallAction (Maybe Text)
aacaAPI = lens _aacaAPI (\ s a -> s{_aacaAPI = a})
instance FromJSON AWSAPICallAction where
parseJSON
= withObject "AWSAPICallAction"
(\ x ->
AWSAPICallAction' <$>
(x .:? "remoteIpDetails") <*> (x .:? "callerType")
<*> (x .:? "domainDetails")
<*> (x .:? "serviceName")
<*> (x .:? "api"))
instance Hashable AWSAPICallAction where
instance NFData AWSAPICallAction where
data AccessKeyDetails = AccessKeyDetails'
{ _akdPrincipalId :: !(Maybe Text)
, _akdUserName :: !(Maybe Text)
, _akdAccessKeyId :: !(Maybe Text)
, _akdUserType :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
accessKeyDetails
:: AccessKeyDetails
accessKeyDetails =
AccessKeyDetails'
{ _akdPrincipalId = Nothing
, _akdUserName = Nothing
, _akdAccessKeyId = Nothing
, _akdUserType = Nothing
}
akdPrincipalId :: Lens' AccessKeyDetails (Maybe Text)
akdPrincipalId = lens _akdPrincipalId (\ s a -> s{_akdPrincipalId = a})
akdUserName :: Lens' AccessKeyDetails (Maybe Text)
akdUserName = lens _akdUserName (\ s a -> s{_akdUserName = a})
akdAccessKeyId :: Lens' AccessKeyDetails (Maybe Text)
akdAccessKeyId = lens _akdAccessKeyId (\ s a -> s{_akdAccessKeyId = a})
akdUserType :: Lens' AccessKeyDetails (Maybe Text)
akdUserType = lens _akdUserType (\ s a -> s{_akdUserType = a})
instance FromJSON AccessKeyDetails where
parseJSON
= withObject "AccessKeyDetails"
(\ x ->
AccessKeyDetails' <$>
(x .:? "principalId") <*> (x .:? "userName") <*>
(x .:? "accessKeyId")
<*> (x .:? "userType"))
instance Hashable AccessKeyDetails where
instance NFData AccessKeyDetails where
data AccountDetail = AccountDetail'
{ _adEmail :: !Text
, _adAccountId :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
accountDetail
:: Text
-> Text
-> AccountDetail
accountDetail pEmail_ pAccountId_ =
AccountDetail' {_adEmail = pEmail_, _adAccountId = pAccountId_}
adEmail :: Lens' AccountDetail Text
adEmail = lens _adEmail (\ s a -> s{_adEmail = a})
adAccountId :: Lens' AccountDetail Text
adAccountId = lens _adAccountId (\ s a -> s{_adAccountId = a})
instance Hashable AccountDetail where
instance NFData AccountDetail where
instance ToJSON AccountDetail where
toJSON AccountDetail'{..}
= object
(catMaybes
[Just ("email" .= _adEmail),
Just ("accountId" .= _adAccountId)])
data Action = Action'
{ _aNetworkConnectionAction :: !(Maybe NetworkConnectionAction)
, _aPortProbeAction :: !(Maybe PortProbeAction)
, _aActionType :: !(Maybe Text)
, _aDNSRequestAction :: !(Maybe DNSRequestAction)
, _aAWSAPICallAction :: !(Maybe AWSAPICallAction)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
action
:: Action
action =
Action'
{ _aNetworkConnectionAction = Nothing
, _aPortProbeAction = Nothing
, _aActionType = Nothing
, _aDNSRequestAction = Nothing
, _aAWSAPICallAction = Nothing
}
aNetworkConnectionAction :: Lens' Action (Maybe NetworkConnectionAction)
aNetworkConnectionAction = lens _aNetworkConnectionAction (\ s a -> s{_aNetworkConnectionAction = a})
aPortProbeAction :: Lens' Action (Maybe PortProbeAction)
aPortProbeAction = lens _aPortProbeAction (\ s a -> s{_aPortProbeAction = a})
aActionType :: Lens' Action (Maybe Text)
aActionType = lens _aActionType (\ s a -> s{_aActionType = a})
aDNSRequestAction :: Lens' Action (Maybe DNSRequestAction)
aDNSRequestAction = lens _aDNSRequestAction (\ s a -> s{_aDNSRequestAction = a})
aAWSAPICallAction :: Lens' Action (Maybe AWSAPICallAction)
aAWSAPICallAction = lens _aAWSAPICallAction (\ s a -> s{_aAWSAPICallAction = a})
instance FromJSON Action where
parseJSON
= withObject "Action"
(\ x ->
Action' <$>
(x .:? "networkConnectionAction") <*>
(x .:? "portProbeAction")
<*> (x .:? "actionType")
<*> (x .:? "dnsRequestAction")
<*> (x .:? "awsApiCallAction"))
instance Hashable Action where
instance NFData Action where
newtype City = City'
{ _cCityName :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
city
:: City
city = City' {_cCityName = Nothing}
cCityName :: Lens' City (Maybe Text)
cCityName = lens _cCityName (\ s a -> s{_cCityName = a})
instance FromJSON City where
parseJSON
= withObject "City"
(\ x -> City' <$> (x .:? "cityName"))
instance Hashable City where
instance NFData City where
data Condition = Condition'
{ _cEQ :: !(Maybe [Text])
, _cLte :: !(Maybe Int)
, _cGT :: !(Maybe Int)
, _cNeq :: !(Maybe [Text])
, _cLT :: !(Maybe Int)
, _cGte :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
condition
:: Condition
condition =
Condition'
{ _cEQ = Nothing
, _cLte = Nothing
, _cGT = Nothing
, _cNeq = Nothing
, _cLT = Nothing
, _cGte = Nothing
}
cEQ :: Lens' Condition [Text]
cEQ = lens _cEQ (\ s a -> s{_cEQ = a}) . _Default . _Coerce
cLte :: Lens' Condition (Maybe Int)
cLte = lens _cLte (\ s a -> s{_cLte = a})
cGT :: Lens' Condition (Maybe Int)
cGT = lens _cGT (\ s a -> s{_cGT = a})
cNeq :: Lens' Condition [Text]
cNeq = lens _cNeq (\ s a -> s{_cNeq = a}) . _Default . _Coerce
cLT :: Lens' Condition (Maybe Int)
cLT = lens _cLT (\ s a -> s{_cLT = a})
cGte :: Lens' Condition (Maybe Int)
cGte = lens _cGte (\ s a -> s{_cGte = a})
instance FromJSON Condition where
parseJSON
= withObject "Condition"
(\ x ->
Condition' <$>
(x .:? "eq" .!= mempty) <*> (x .:? "lte") <*>
(x .:? "gt")
<*> (x .:? "neq" .!= mempty)
<*> (x .:? "lt")
<*> (x .:? "gte"))
instance Hashable Condition where
instance NFData Condition where
instance ToJSON Condition where
toJSON Condition'{..}
= object
(catMaybes
[("eq" .=) <$> _cEQ, ("lte" .=) <$> _cLte,
("gt" .=) <$> _cGT, ("neq" .=) <$> _cNeq,
("lt" .=) <$> _cLT, ("gte" .=) <$> _cGte])
data Country = Country'
{ _cCountryName :: !(Maybe Text)
, _cCountryCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
country
:: Country
country = Country' {_cCountryName = Nothing, _cCountryCode = Nothing}
cCountryName :: Lens' Country (Maybe Text)
cCountryName = lens _cCountryName (\ s a -> s{_cCountryName = a})
cCountryCode :: Lens' Country (Maybe Text)
cCountryCode = lens _cCountryCode (\ s a -> s{_cCountryCode = a})
instance FromJSON Country where
parseJSON
= withObject "Country"
(\ x ->
Country' <$>
(x .:? "countryName") <*> (x .:? "countryCode"))
instance Hashable Country where
instance NFData Country where
newtype DNSRequestAction = DNSRequestAction'
{ _draDomain :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
dnsRequestAction
:: DNSRequestAction
dnsRequestAction = DNSRequestAction' {_draDomain = Nothing}
draDomain :: Lens' DNSRequestAction (Maybe Text)
draDomain = lens _draDomain (\ s a -> s{_draDomain = a})
instance FromJSON DNSRequestAction where
parseJSON
= withObject "DNSRequestAction"
(\ x -> DNSRequestAction' <$> (x .:? "domain"))
instance Hashable DNSRequestAction where
instance NFData DNSRequestAction where
data DomainDetails =
DomainDetails'
deriving (Eq, Read, Show, Data, Typeable, Generic)
domainDetails
:: DomainDetails
domainDetails = DomainDetails'
instance FromJSON DomainDetails where
parseJSON
= withObject "DomainDetails"
(\ x -> pure DomainDetails')
instance Hashable DomainDetails where
instance NFData DomainDetails where
data Finding = Finding'
{ _fService :: !(Maybe ServiceInfo)
, _fConfidence :: !(Maybe Double)
, _fPartition :: !(Maybe Text)
, _fTitle :: !(Maybe Text)
, _fDescription :: !(Maybe Text)
, _fAccountId :: !Text
, _fSchemaVersion :: !Text
, _fCreatedAt :: !Text
, _fResource :: !Resource
, _fSeverity :: !Double
, _fUpdatedAt :: !Text
, _fType :: !Text
, _fRegion :: !Text
, _fId :: !Text
, _fARN :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
finding
:: Text
-> Text
-> Text
-> Resource
-> Double
-> Text
-> Text
-> Text
-> Text
-> Text
-> Finding
finding pAccountId_ pSchemaVersion_ pCreatedAt_ pResource_ pSeverity_ pUpdatedAt_ pType_ pRegion_ pId_ pARN_ =
Finding'
{ _fService = Nothing
, _fConfidence = Nothing
, _fPartition = Nothing
, _fTitle = Nothing
, _fDescription = Nothing
, _fAccountId = pAccountId_
, _fSchemaVersion = pSchemaVersion_
, _fCreatedAt = pCreatedAt_
, _fResource = pResource_
, _fSeverity = pSeverity_
, _fUpdatedAt = pUpdatedAt_
, _fType = pType_
, _fRegion = pRegion_
, _fId = pId_
, _fARN = pARN_
}
fService :: Lens' Finding (Maybe ServiceInfo)
fService = lens _fService (\ s a -> s{_fService = a})
fConfidence :: Lens' Finding (Maybe Double)
fConfidence = lens _fConfidence (\ s a -> s{_fConfidence = a})
fPartition :: Lens' Finding (Maybe Text)
fPartition = lens _fPartition (\ s a -> s{_fPartition = a})
fTitle :: Lens' Finding (Maybe Text)
fTitle = lens _fTitle (\ s a -> s{_fTitle = a})
fDescription :: Lens' Finding (Maybe Text)
fDescription = lens _fDescription (\ s a -> s{_fDescription = a})
fAccountId :: Lens' Finding Text
fAccountId = lens _fAccountId (\ s a -> s{_fAccountId = a})
fSchemaVersion :: Lens' Finding Text
fSchemaVersion = lens _fSchemaVersion (\ s a -> s{_fSchemaVersion = a})
fCreatedAt :: Lens' Finding Text
fCreatedAt = lens _fCreatedAt (\ s a -> s{_fCreatedAt = a})
fResource :: Lens' Finding Resource
fResource = lens _fResource (\ s a -> s{_fResource = a})
fSeverity :: Lens' Finding Double
fSeverity = lens _fSeverity (\ s a -> s{_fSeverity = a})
fUpdatedAt :: Lens' Finding Text
fUpdatedAt = lens _fUpdatedAt (\ s a -> s{_fUpdatedAt = a})
fType :: Lens' Finding Text
fType = lens _fType (\ s a -> s{_fType = a})
fRegion :: Lens' Finding Text
fRegion = lens _fRegion (\ s a -> s{_fRegion = a})
fId :: Lens' Finding Text
fId = lens _fId (\ s a -> s{_fId = a})
fARN :: Lens' Finding Text
fARN = lens _fARN (\ s a -> s{_fARN = a})
instance FromJSON Finding where
parseJSON
= withObject "Finding"
(\ x ->
Finding' <$>
(x .:? "service") <*> (x .:? "confidence") <*>
(x .:? "partition")
<*> (x .:? "title")
<*> (x .:? "description")
<*> (x .: "accountId")
<*> (x .: "schemaVersion")
<*> (x .: "createdAt")
<*> (x .: "resource")
<*> (x .: "severity")
<*> (x .: "updatedAt")
<*> (x .: "type")
<*> (x .: "region")
<*> (x .: "id")
<*> (x .: "arn"))
instance Hashable Finding where
instance NFData Finding where
newtype FindingCriteria = FindingCriteria'
{ _fcCriterion :: Maybe (Map Text Condition)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
findingCriteria
:: FindingCriteria
findingCriteria = FindingCriteria' {_fcCriterion = Nothing}
fcCriterion :: Lens' FindingCriteria (HashMap Text Condition)
fcCriterion = lens _fcCriterion (\ s a -> s{_fcCriterion = a}) . _Default . _Map
instance FromJSON FindingCriteria where
parseJSON
= withObject "FindingCriteria"
(\ x ->
FindingCriteria' <$> (x .:? "criterion" .!= mempty))
instance Hashable FindingCriteria where
instance NFData FindingCriteria where
instance ToJSON FindingCriteria where
toJSON FindingCriteria'{..}
= object
(catMaybes [("criterion" .=) <$> _fcCriterion])
newtype FindingStatistics = FindingStatistics'
{ _fsCountBySeverity :: Maybe (Map Text Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
findingStatistics
:: FindingStatistics
findingStatistics = FindingStatistics' {_fsCountBySeverity = Nothing}
fsCountBySeverity :: Lens' FindingStatistics (HashMap Text Int)
fsCountBySeverity = lens _fsCountBySeverity (\ s a -> s{_fsCountBySeverity = a}) . _Default . _Map
instance FromJSON FindingStatistics where
parseJSON
= withObject "FindingStatistics"
(\ x ->
FindingStatistics' <$>
(x .:? "countBySeverity" .!= mempty))
instance Hashable FindingStatistics where
instance NFData FindingStatistics where
data GeoLocation = GeoLocation'
{ _glLat :: !(Maybe Double)
, _glLon :: !(Maybe Double)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
geoLocation
:: GeoLocation
geoLocation = GeoLocation' {_glLat = Nothing, _glLon = Nothing}
glLat :: Lens' GeoLocation (Maybe Double)
glLat = lens _glLat (\ s a -> s{_glLat = a})
glLon :: Lens' GeoLocation (Maybe Double)
glLon = lens _glLon (\ s a -> s{_glLon = a})
instance FromJSON GeoLocation where
parseJSON
= withObject "GeoLocation"
(\ x ->
GeoLocation' <$> (x .:? "lat") <*> (x .:? "lon"))
instance Hashable GeoLocation where
instance NFData GeoLocation where
data IAMInstanceProfile = IAMInstanceProfile'
{ _iapARN :: !(Maybe Text)
, _iapId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
iamInstanceProfile
:: IAMInstanceProfile
iamInstanceProfile = IAMInstanceProfile' {_iapARN = Nothing, _iapId = Nothing}
iapARN :: Lens' IAMInstanceProfile (Maybe Text)
iapARN = lens _iapARN (\ s a -> s{_iapARN = a})
iapId :: Lens' IAMInstanceProfile (Maybe Text)
iapId = lens _iapId (\ s a -> s{_iapId = a})
instance FromJSON IAMInstanceProfile where
parseJSON
= withObject "IAMInstanceProfile"
(\ x ->
IAMInstanceProfile' <$>
(x .:? "arn") <*> (x .:? "id"))
instance Hashable IAMInstanceProfile where
instance NFData IAMInstanceProfile where
data InstanceDetails = InstanceDetails'
{ _idInstanceId :: !(Maybe Text)
, _idPlatform :: !(Maybe Text)
, _idLaunchTime :: !(Maybe Text)
, _idNetworkInterfaces :: !(Maybe [NetworkInterface])
, _idInstanceType :: !(Maybe Text)
, _idAvailabilityZone :: !(Maybe Text)
, _idIAMInstanceProfile :: !(Maybe IAMInstanceProfile)
, _idImageId :: !(Maybe Text)
, _idProductCodes :: !(Maybe [ProductCode])
, _idInstanceState :: !(Maybe Text)
, _idTags :: !(Maybe [Tag])
, _idImageDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instanceDetails
:: InstanceDetails
instanceDetails =
InstanceDetails'
{ _idInstanceId = Nothing
, _idPlatform = Nothing
, _idLaunchTime = Nothing
, _idNetworkInterfaces = Nothing
, _idInstanceType = Nothing
, _idAvailabilityZone = Nothing
, _idIAMInstanceProfile = Nothing
, _idImageId = Nothing
, _idProductCodes = Nothing
, _idInstanceState = Nothing
, _idTags = Nothing
, _idImageDescription = Nothing
}
idInstanceId :: Lens' InstanceDetails (Maybe Text)
idInstanceId = lens _idInstanceId (\ s a -> s{_idInstanceId = a})
idPlatform :: Lens' InstanceDetails (Maybe Text)
idPlatform = lens _idPlatform (\ s a -> s{_idPlatform = a})
idLaunchTime :: Lens' InstanceDetails (Maybe Text)
idLaunchTime = lens _idLaunchTime (\ s a -> s{_idLaunchTime = a})
idNetworkInterfaces :: Lens' InstanceDetails [NetworkInterface]
idNetworkInterfaces = lens _idNetworkInterfaces (\ s a -> s{_idNetworkInterfaces = a}) . _Default . _Coerce
idInstanceType :: Lens' InstanceDetails (Maybe Text)
idInstanceType = lens _idInstanceType (\ s a -> s{_idInstanceType = a})
idAvailabilityZone :: Lens' InstanceDetails (Maybe Text)
idAvailabilityZone = lens _idAvailabilityZone (\ s a -> s{_idAvailabilityZone = a})
idIAMInstanceProfile :: Lens' InstanceDetails (Maybe IAMInstanceProfile)
idIAMInstanceProfile = lens _idIAMInstanceProfile (\ s a -> s{_idIAMInstanceProfile = a})
idImageId :: Lens' InstanceDetails (Maybe Text)
idImageId = lens _idImageId (\ s a -> s{_idImageId = a})
idProductCodes :: Lens' InstanceDetails [ProductCode]
idProductCodes = lens _idProductCodes (\ s a -> s{_idProductCodes = a}) . _Default . _Coerce
idInstanceState :: Lens' InstanceDetails (Maybe Text)
idInstanceState = lens _idInstanceState (\ s a -> s{_idInstanceState = a})
idTags :: Lens' InstanceDetails [Tag]
idTags = lens _idTags (\ s a -> s{_idTags = a}) . _Default . _Coerce
idImageDescription :: Lens' InstanceDetails (Maybe Text)
idImageDescription = lens _idImageDescription (\ s a -> s{_idImageDescription = a})
instance FromJSON InstanceDetails where
parseJSON
= withObject "InstanceDetails"
(\ x ->
InstanceDetails' <$>
(x .:? "instanceId") <*> (x .:? "platform") <*>
(x .:? "launchTime")
<*> (x .:? "networkInterfaces" .!= mempty)
<*> (x .:? "instanceType")
<*> (x .:? "availabilityZone")
<*> (x .:? "iamInstanceProfile")
<*> (x .:? "imageId")
<*> (x .:? "productCodes" .!= mempty)
<*> (x .:? "instanceState")
<*> (x .:? "tags" .!= mempty)
<*> (x .:? "imageDescription"))
instance Hashable InstanceDetails where
instance NFData InstanceDetails where
data Invitation = Invitation'
{ _iInvitedAt :: !(Maybe Text)
, _iRelationshipStatus :: !(Maybe Text)
, _iInvitationId :: !(Maybe Text)
, _iAccountId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
invitation
:: Invitation
invitation =
Invitation'
{ _iInvitedAt = Nothing
, _iRelationshipStatus = Nothing
, _iInvitationId = Nothing
, _iAccountId = Nothing
}
iInvitedAt :: Lens' Invitation (Maybe Text)
iInvitedAt = lens _iInvitedAt (\ s a -> s{_iInvitedAt = a})
iRelationshipStatus :: Lens' Invitation (Maybe Text)
iRelationshipStatus = lens _iRelationshipStatus (\ s a -> s{_iRelationshipStatus = a})
iInvitationId :: Lens' Invitation (Maybe Text)
iInvitationId = lens _iInvitationId (\ s a -> s{_iInvitationId = a})
iAccountId :: Lens' Invitation (Maybe Text)
iAccountId = lens _iAccountId (\ s a -> s{_iAccountId = a})
instance FromJSON Invitation where
parseJSON
= withObject "Invitation"
(\ x ->
Invitation' <$>
(x .:? "invitedAt") <*> (x .:? "relationshipStatus")
<*> (x .:? "invitationId")
<*> (x .:? "accountId"))
instance Hashable Invitation where
instance NFData Invitation where
data LocalPortDetails = LocalPortDetails'
{ _lpdPortName :: !(Maybe Text)
, _lpdPort :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
localPortDetails
:: LocalPortDetails
localPortDetails =
LocalPortDetails' {_lpdPortName = Nothing, _lpdPort = Nothing}
lpdPortName :: Lens' LocalPortDetails (Maybe Text)
lpdPortName = lens _lpdPortName (\ s a -> s{_lpdPortName = a})
lpdPort :: Lens' LocalPortDetails (Maybe Int)
lpdPort = lens _lpdPort (\ s a -> s{_lpdPort = a})
instance FromJSON LocalPortDetails where
parseJSON
= withObject "LocalPortDetails"
(\ x ->
LocalPortDetails' <$>
(x .:? "portName") <*> (x .:? "port"))
instance Hashable LocalPortDetails where
instance NFData LocalPortDetails where
data Master = Master'
{ _masInvitedAt :: !(Maybe Text)
, _masRelationshipStatus :: !(Maybe Text)
, _masInvitationId :: !(Maybe Text)
, _masAccountId :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
master
:: Master
master =
Master'
{ _masInvitedAt = Nothing
, _masRelationshipStatus = Nothing
, _masInvitationId = Nothing
, _masAccountId = Nothing
}
masInvitedAt :: Lens' Master (Maybe Text)
masInvitedAt = lens _masInvitedAt (\ s a -> s{_masInvitedAt = a})
masRelationshipStatus :: Lens' Master (Maybe Text)
masRelationshipStatus = lens _masRelationshipStatus (\ s a -> s{_masRelationshipStatus = a})
masInvitationId :: Lens' Master (Maybe Text)
masInvitationId = lens _masInvitationId (\ s a -> s{_masInvitationId = a})
masAccountId :: Lens' Master (Maybe Text)
masAccountId = lens _masAccountId (\ s a -> s{_masAccountId = a})
instance FromJSON Master where
parseJSON
= withObject "Master"
(\ x ->
Master' <$>
(x .:? "invitedAt") <*> (x .:? "relationshipStatus")
<*> (x .:? "invitationId")
<*> (x .:? "accountId"))
instance Hashable Master where
instance NFData Master where
data Member = Member'
{ _mInvitedAt :: !(Maybe Text)
, _mDetectorId :: !(Maybe Text)
, _mEmail :: !Text
, _mAccountId :: !Text
, _mMasterId :: !Text
, _mUpdatedAt :: !Text
, _mRelationshipStatus :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
member
:: Text
-> Text
-> Text
-> Text
-> Text
-> Member
member pEmail_ pAccountId_ pMasterId_ pUpdatedAt_ pRelationshipStatus_ =
Member'
{ _mInvitedAt = Nothing
, _mDetectorId = Nothing
, _mEmail = pEmail_
, _mAccountId = pAccountId_
, _mMasterId = pMasterId_
, _mUpdatedAt = pUpdatedAt_
, _mRelationshipStatus = pRelationshipStatus_
}
mInvitedAt :: Lens' Member (Maybe Text)
mInvitedAt = lens _mInvitedAt (\ s a -> s{_mInvitedAt = a})
mDetectorId :: Lens' Member (Maybe Text)
mDetectorId = lens _mDetectorId (\ s a -> s{_mDetectorId = a})
mEmail :: Lens' Member Text
mEmail = lens _mEmail (\ s a -> s{_mEmail = a})
mAccountId :: Lens' Member Text
mAccountId = lens _mAccountId (\ s a -> s{_mAccountId = a})
mMasterId :: Lens' Member Text
mMasterId = lens _mMasterId (\ s a -> s{_mMasterId = a})
mUpdatedAt :: Lens' Member Text
mUpdatedAt = lens _mUpdatedAt (\ s a -> s{_mUpdatedAt = a})
mRelationshipStatus :: Lens' Member Text
mRelationshipStatus = lens _mRelationshipStatus (\ s a -> s{_mRelationshipStatus = a})
instance FromJSON Member where
parseJSON
= withObject "Member"
(\ x ->
Member' <$>
(x .:? "invitedAt") <*> (x .:? "detectorId") <*>
(x .: "email")
<*> (x .: "accountId")
<*> (x .: "masterId")
<*> (x .: "updatedAt")
<*> (x .: "relationshipStatus"))
instance Hashable Member where
instance NFData Member where
data NetworkConnectionAction = NetworkConnectionAction'
{ _ncaRemoteIPDetails :: !(Maybe RemoteIPDetails)
, _ncaProtocol :: !(Maybe Text)
, _ncaRemotePortDetails :: !(Maybe RemotePortDetails)
, _ncaBlocked :: !(Maybe Bool)
, _ncaConnectionDirection :: !(Maybe Text)
, _ncaLocalPortDetails :: !(Maybe LocalPortDetails)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
networkConnectionAction
:: NetworkConnectionAction
networkConnectionAction =
NetworkConnectionAction'
{ _ncaRemoteIPDetails = Nothing
, _ncaProtocol = Nothing
, _ncaRemotePortDetails = Nothing
, _ncaBlocked = Nothing
, _ncaConnectionDirection = Nothing
, _ncaLocalPortDetails = Nothing
}
ncaRemoteIPDetails :: Lens' NetworkConnectionAction (Maybe RemoteIPDetails)
ncaRemoteIPDetails = lens _ncaRemoteIPDetails (\ s a -> s{_ncaRemoteIPDetails = a})
ncaProtocol :: Lens' NetworkConnectionAction (Maybe Text)
ncaProtocol = lens _ncaProtocol (\ s a -> s{_ncaProtocol = a})
ncaRemotePortDetails :: Lens' NetworkConnectionAction (Maybe RemotePortDetails)
ncaRemotePortDetails = lens _ncaRemotePortDetails (\ s a -> s{_ncaRemotePortDetails = a})
ncaBlocked :: Lens' NetworkConnectionAction (Maybe Bool)
ncaBlocked = lens _ncaBlocked (\ s a -> s{_ncaBlocked = a})
ncaConnectionDirection :: Lens' NetworkConnectionAction (Maybe Text)
ncaConnectionDirection = lens _ncaConnectionDirection (\ s a -> s{_ncaConnectionDirection = a})
ncaLocalPortDetails :: Lens' NetworkConnectionAction (Maybe LocalPortDetails)
ncaLocalPortDetails = lens _ncaLocalPortDetails (\ s a -> s{_ncaLocalPortDetails = a})
instance FromJSON NetworkConnectionAction where
parseJSON
= withObject "NetworkConnectionAction"
(\ x ->
NetworkConnectionAction' <$>
(x .:? "remoteIpDetails") <*> (x .:? "protocol") <*>
(x .:? "remotePortDetails")
<*> (x .:? "blocked")
<*> (x .:? "connectionDirection")
<*> (x .:? "localPortDetails"))
instance Hashable NetworkConnectionAction where
instance NFData NetworkConnectionAction where
data NetworkInterface = NetworkInterface'
{ _niPrivateIPAddresses :: !(Maybe [PrivateIPAddressDetails])
, _niPublicDNSName :: !(Maybe Text)
, _niSecurityGroups :: !(Maybe [SecurityGroup])
, _niVPCId :: !(Maybe Text)
, _niNetworkInterfaceId :: !(Maybe Text)
, _niSubnetId :: !(Maybe Text)
, _niPrivateIPAddress :: !(Maybe Text)
, _niPublicIP :: !(Maybe Text)
, _niPrivateDNSName :: !(Maybe Text)
, _niIPv6Addresses :: !(Maybe [Text])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
networkInterface
:: NetworkInterface
networkInterface =
NetworkInterface'
{ _niPrivateIPAddresses = Nothing
, _niPublicDNSName = Nothing
, _niSecurityGroups = Nothing
, _niVPCId = Nothing
, _niNetworkInterfaceId = Nothing
, _niSubnetId = Nothing
, _niPrivateIPAddress = Nothing
, _niPublicIP = Nothing
, _niPrivateDNSName = Nothing
, _niIPv6Addresses = Nothing
}
niPrivateIPAddresses :: Lens' NetworkInterface [PrivateIPAddressDetails]
niPrivateIPAddresses = lens _niPrivateIPAddresses (\ s a -> s{_niPrivateIPAddresses = a}) . _Default . _Coerce
niPublicDNSName :: Lens' NetworkInterface (Maybe Text)
niPublicDNSName = lens _niPublicDNSName (\ s a -> s{_niPublicDNSName = a})
niSecurityGroups :: Lens' NetworkInterface [SecurityGroup]
niSecurityGroups = lens _niSecurityGroups (\ s a -> s{_niSecurityGroups = a}) . _Default . _Coerce
niVPCId :: Lens' NetworkInterface (Maybe Text)
niVPCId = lens _niVPCId (\ s a -> s{_niVPCId = a})
niNetworkInterfaceId :: Lens' NetworkInterface (Maybe Text)
niNetworkInterfaceId = lens _niNetworkInterfaceId (\ s a -> s{_niNetworkInterfaceId = a})
niSubnetId :: Lens' NetworkInterface (Maybe Text)
niSubnetId = lens _niSubnetId (\ s a -> s{_niSubnetId = a})
niPrivateIPAddress :: Lens' NetworkInterface (Maybe Text)
niPrivateIPAddress = lens _niPrivateIPAddress (\ s a -> s{_niPrivateIPAddress = a})
niPublicIP :: Lens' NetworkInterface (Maybe Text)
niPublicIP = lens _niPublicIP (\ s a -> s{_niPublicIP = a})
niPrivateDNSName :: Lens' NetworkInterface (Maybe Text)
niPrivateDNSName = lens _niPrivateDNSName (\ s a -> s{_niPrivateDNSName = a})
niIPv6Addresses :: Lens' NetworkInterface [Text]
niIPv6Addresses = lens _niIPv6Addresses (\ s a -> s{_niIPv6Addresses = a}) . _Default . _Coerce
instance FromJSON NetworkInterface where
parseJSON
= withObject "NetworkInterface"
(\ x ->
NetworkInterface' <$>
(x .:? "privateIpAddresses" .!= mempty) <*>
(x .:? "publicDnsName")
<*> (x .:? "securityGroups" .!= mempty)
<*> (x .:? "vpcId")
<*> (x .:? "networkInterfaceId")
<*> (x .:? "subnetId")
<*> (x .:? "privateIpAddress")
<*> (x .:? "publicIp")
<*> (x .:? "privateDnsName")
<*> (x .:? "ipv6Addresses" .!= mempty))
instance Hashable NetworkInterface where
instance NFData NetworkInterface where
data Organization = Organization'
{ _oOrg :: !(Maybe Text)
, _oASNOrg :: !(Maybe Text)
, _oASN :: !(Maybe Text)
, _oIsp :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
organization
:: Organization
organization =
Organization'
{_oOrg = Nothing, _oASNOrg = Nothing, _oASN = Nothing, _oIsp = Nothing}
oOrg :: Lens' Organization (Maybe Text)
oOrg = lens _oOrg (\ s a -> s{_oOrg = a})
oASNOrg :: Lens' Organization (Maybe Text)
oASNOrg = lens _oASNOrg (\ s a -> s{_oASNOrg = a})
oASN :: Lens' Organization (Maybe Text)
oASN = lens _oASN (\ s a -> s{_oASN = a})
oIsp :: Lens' Organization (Maybe Text)
oIsp = lens _oIsp (\ s a -> s{_oIsp = a})
instance FromJSON Organization where
parseJSON
= withObject "Organization"
(\ x ->
Organization' <$>
(x .:? "org") <*> (x .:? "asnOrg") <*> (x .:? "asn")
<*> (x .:? "isp"))
instance Hashable Organization where
instance NFData Organization where
data PortProbeAction = PortProbeAction'
{ _ppaPortProbeDetails :: !(Maybe [PortProbeDetail])
, _ppaBlocked :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
portProbeAction
:: PortProbeAction
portProbeAction =
PortProbeAction' {_ppaPortProbeDetails = Nothing, _ppaBlocked = Nothing}
ppaPortProbeDetails :: Lens' PortProbeAction [PortProbeDetail]
ppaPortProbeDetails = lens _ppaPortProbeDetails (\ s a -> s{_ppaPortProbeDetails = a}) . _Default . _Coerce
ppaBlocked :: Lens' PortProbeAction (Maybe Bool)
ppaBlocked = lens _ppaBlocked (\ s a -> s{_ppaBlocked = a})
instance FromJSON PortProbeAction where
parseJSON
= withObject "PortProbeAction"
(\ x ->
PortProbeAction' <$>
(x .:? "portProbeDetails" .!= mempty) <*>
(x .:? "blocked"))
instance Hashable PortProbeAction where
instance NFData PortProbeAction where
data PortProbeDetail = PortProbeDetail'
{ _ppdRemoteIPDetails :: !(Maybe RemoteIPDetails)
, _ppdLocalPortDetails :: !(Maybe LocalPortDetails)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
portProbeDetail
:: PortProbeDetail
portProbeDetail =
PortProbeDetail'
{_ppdRemoteIPDetails = Nothing, _ppdLocalPortDetails = Nothing}
ppdRemoteIPDetails :: Lens' PortProbeDetail (Maybe RemoteIPDetails)
ppdRemoteIPDetails = lens _ppdRemoteIPDetails (\ s a -> s{_ppdRemoteIPDetails = a})
ppdLocalPortDetails :: Lens' PortProbeDetail (Maybe LocalPortDetails)
ppdLocalPortDetails = lens _ppdLocalPortDetails (\ s a -> s{_ppdLocalPortDetails = a})
instance FromJSON PortProbeDetail where
parseJSON
= withObject "PortProbeDetail"
(\ x ->
PortProbeDetail' <$>
(x .:? "remoteIpDetails") <*>
(x .:? "localPortDetails"))
instance Hashable PortProbeDetail where
instance NFData PortProbeDetail where
data PrivateIPAddressDetails = PrivateIPAddressDetails'
{ _piadPrivateIPAddress :: !(Maybe Text)
, _piadPrivateDNSName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
privateIPAddressDetails
:: PrivateIPAddressDetails
privateIPAddressDetails =
PrivateIPAddressDetails'
{_piadPrivateIPAddress = Nothing, _piadPrivateDNSName = Nothing}
piadPrivateIPAddress :: Lens' PrivateIPAddressDetails (Maybe Text)
piadPrivateIPAddress = lens _piadPrivateIPAddress (\ s a -> s{_piadPrivateIPAddress = a})
piadPrivateDNSName :: Lens' PrivateIPAddressDetails (Maybe Text)
piadPrivateDNSName = lens _piadPrivateDNSName (\ s a -> s{_piadPrivateDNSName = a})
instance FromJSON PrivateIPAddressDetails where
parseJSON
= withObject "PrivateIPAddressDetails"
(\ x ->
PrivateIPAddressDetails' <$>
(x .:? "privateIpAddress") <*>
(x .:? "privateDnsName"))
instance Hashable PrivateIPAddressDetails where
instance NFData PrivateIPAddressDetails where
data ProductCode = ProductCode'
{ _pcProductType :: !(Maybe Text)
, _pcCode :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
productCode
:: ProductCode
productCode = ProductCode' {_pcProductType = Nothing, _pcCode = Nothing}
pcProductType :: Lens' ProductCode (Maybe Text)
pcProductType = lens _pcProductType (\ s a -> s{_pcProductType = a})
pcCode :: Lens' ProductCode (Maybe Text)
pcCode = lens _pcCode (\ s a -> s{_pcCode = a})
instance FromJSON ProductCode where
parseJSON
= withObject "ProductCode"
(\ x ->
ProductCode' <$>
(x .:? "productType") <*> (x .:? "code"))
instance Hashable ProductCode where
instance NFData ProductCode where
data RemoteIPDetails = RemoteIPDetails'
{ _ridCountry :: !(Maybe Country)
, _ridCity :: !(Maybe City)
, _ridIPAddressV4 :: !(Maybe Text)
, _ridGeoLocation :: !(Maybe GeoLocation)
, _ridOrganization :: !(Maybe Organization)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
remoteIPDetails
:: RemoteIPDetails
remoteIPDetails =
RemoteIPDetails'
{ _ridCountry = Nothing
, _ridCity = Nothing
, _ridIPAddressV4 = Nothing
, _ridGeoLocation = Nothing
, _ridOrganization = Nothing
}
ridCountry :: Lens' RemoteIPDetails (Maybe Country)
ridCountry = lens _ridCountry (\ s a -> s{_ridCountry = a})
ridCity :: Lens' RemoteIPDetails (Maybe City)
ridCity = lens _ridCity (\ s a -> s{_ridCity = a})
ridIPAddressV4 :: Lens' RemoteIPDetails (Maybe Text)
ridIPAddressV4 = lens _ridIPAddressV4 (\ s a -> s{_ridIPAddressV4 = a})
ridGeoLocation :: Lens' RemoteIPDetails (Maybe GeoLocation)
ridGeoLocation = lens _ridGeoLocation (\ s a -> s{_ridGeoLocation = a})
ridOrganization :: Lens' RemoteIPDetails (Maybe Organization)
ridOrganization = lens _ridOrganization (\ s a -> s{_ridOrganization = a})
instance FromJSON RemoteIPDetails where
parseJSON
= withObject "RemoteIPDetails"
(\ x ->
RemoteIPDetails' <$>
(x .:? "country") <*> (x .:? "city") <*>
(x .:? "ipAddressV4")
<*> (x .:? "geoLocation")
<*> (x .:? "organization"))
instance Hashable RemoteIPDetails where
instance NFData RemoteIPDetails where
data RemotePortDetails = RemotePortDetails'
{ _rpdPortName :: !(Maybe Text)
, _rpdPort :: !(Maybe Int)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
remotePortDetails
:: RemotePortDetails
remotePortDetails =
RemotePortDetails' {_rpdPortName = Nothing, _rpdPort = Nothing}
rpdPortName :: Lens' RemotePortDetails (Maybe Text)
rpdPortName = lens _rpdPortName (\ s a -> s{_rpdPortName = a})
rpdPort :: Lens' RemotePortDetails (Maybe Int)
rpdPort = lens _rpdPort (\ s a -> s{_rpdPort = a})
instance FromJSON RemotePortDetails where
parseJSON
= withObject "RemotePortDetails"
(\ x ->
RemotePortDetails' <$>
(x .:? "portName") <*> (x .:? "port"))
instance Hashable RemotePortDetails where
instance NFData RemotePortDetails where
data Resource = Resource'
{ _rResourceType :: !(Maybe Text)
, _rInstanceDetails :: !(Maybe InstanceDetails)
, _rAccessKeyDetails :: !(Maybe AccessKeyDetails)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
resource
:: Resource
resource =
Resource'
{ _rResourceType = Nothing
, _rInstanceDetails = Nothing
, _rAccessKeyDetails = Nothing
}
rResourceType :: Lens' Resource (Maybe Text)
rResourceType = lens _rResourceType (\ s a -> s{_rResourceType = a})
rInstanceDetails :: Lens' Resource (Maybe InstanceDetails)
rInstanceDetails = lens _rInstanceDetails (\ s a -> s{_rInstanceDetails = a})
rAccessKeyDetails :: Lens' Resource (Maybe AccessKeyDetails)
rAccessKeyDetails = lens _rAccessKeyDetails (\ s a -> s{_rAccessKeyDetails = a})
instance FromJSON Resource where
parseJSON
= withObject "Resource"
(\ x ->
Resource' <$>
(x .:? "resourceType") <*> (x .:? "instanceDetails")
<*> (x .:? "accessKeyDetails"))
instance Hashable Resource where
instance NFData Resource where
data SecurityGroup = SecurityGroup'
{ _sgGroupId :: !(Maybe Text)
, _sgGroupName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
securityGroup
:: SecurityGroup
securityGroup = SecurityGroup' {_sgGroupId = Nothing, _sgGroupName = Nothing}
sgGroupId :: Lens' SecurityGroup (Maybe Text)
sgGroupId = lens _sgGroupId (\ s a -> s{_sgGroupId = a})
sgGroupName :: Lens' SecurityGroup (Maybe Text)
sgGroupName = lens _sgGroupName (\ s a -> s{_sgGroupName = a})
instance FromJSON SecurityGroup where
parseJSON
= withObject "SecurityGroup"
(\ x ->
SecurityGroup' <$>
(x .:? "groupId") <*> (x .:? "groupName"))
instance Hashable SecurityGroup where
instance NFData SecurityGroup where
data ServiceInfo = ServiceInfo'
{ _siCount :: !(Maybe Int)
, _siEventFirstSeen :: !(Maybe Text)
, _siAction :: !(Maybe Action)
, _siDetectorId :: !(Maybe Text)
, _siServiceName :: !(Maybe Text)
, _siUserFeedback :: !(Maybe Text)
, _siEventLastSeen :: !(Maybe Text)
, _siResourceRole :: !(Maybe Text)
, _siArchived :: !(Maybe Bool)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
serviceInfo
:: ServiceInfo
serviceInfo =
ServiceInfo'
{ _siCount = Nothing
, _siEventFirstSeen = Nothing
, _siAction = Nothing
, _siDetectorId = Nothing
, _siServiceName = Nothing
, _siUserFeedback = Nothing
, _siEventLastSeen = Nothing
, _siResourceRole = Nothing
, _siArchived = Nothing
}
siCount :: Lens' ServiceInfo (Maybe Int)
siCount = lens _siCount (\ s a -> s{_siCount = a})
siEventFirstSeen :: Lens' ServiceInfo (Maybe Text)
siEventFirstSeen = lens _siEventFirstSeen (\ s a -> s{_siEventFirstSeen = a})
siAction :: Lens' ServiceInfo (Maybe Action)
siAction = lens _siAction (\ s a -> s{_siAction = a})
siDetectorId :: Lens' ServiceInfo (Maybe Text)
siDetectorId = lens _siDetectorId (\ s a -> s{_siDetectorId = a})
siServiceName :: Lens' ServiceInfo (Maybe Text)
siServiceName = lens _siServiceName (\ s a -> s{_siServiceName = a})
siUserFeedback :: Lens' ServiceInfo (Maybe Text)
siUserFeedback = lens _siUserFeedback (\ s a -> s{_siUserFeedback = a})
siEventLastSeen :: Lens' ServiceInfo (Maybe Text)
siEventLastSeen = lens _siEventLastSeen (\ s a -> s{_siEventLastSeen = a})
siResourceRole :: Lens' ServiceInfo (Maybe Text)
siResourceRole = lens _siResourceRole (\ s a -> s{_siResourceRole = a})
siArchived :: Lens' ServiceInfo (Maybe Bool)
siArchived = lens _siArchived (\ s a -> s{_siArchived = a})
instance FromJSON ServiceInfo where
parseJSON
= withObject "ServiceInfo"
(\ x ->
ServiceInfo' <$>
(x .:? "count") <*> (x .:? "eventFirstSeen") <*>
(x .:? "action")
<*> (x .:? "detectorId")
<*> (x .:? "serviceName")
<*> (x .:? "userFeedback")
<*> (x .:? "eventLastSeen")
<*> (x .:? "resourceRole")
<*> (x .:? "archived"))
instance Hashable ServiceInfo where
instance NFData ServiceInfo where
data SortCriteria = SortCriteria'
{ _scOrderBy :: !(Maybe OrderBy)
, _scAttributeName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sortCriteria
:: SortCriteria
sortCriteria = SortCriteria' {_scOrderBy = Nothing, _scAttributeName = Nothing}
scOrderBy :: Lens' SortCriteria (Maybe OrderBy)
scOrderBy = lens _scOrderBy (\ s a -> s{_scOrderBy = a})
scAttributeName :: Lens' SortCriteria (Maybe Text)
scAttributeName = lens _scAttributeName (\ s a -> s{_scAttributeName = a})
instance Hashable SortCriteria where
instance NFData SortCriteria where
instance ToJSON SortCriteria where
toJSON SortCriteria'{..}
= object
(catMaybes
[("orderBy" .=) <$> _scOrderBy,
("attributeName" .=) <$> _scAttributeName])
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 Hashable Tag where
instance NFData Tag where
data UnprocessedAccount = UnprocessedAccount'
{ _uaAccountId :: !Text
, _uaResult :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
unprocessedAccount
:: Text
-> Text
-> UnprocessedAccount
unprocessedAccount pAccountId_ pResult_ =
UnprocessedAccount' {_uaAccountId = pAccountId_, _uaResult = pResult_}
uaAccountId :: Lens' UnprocessedAccount Text
uaAccountId = lens _uaAccountId (\ s a -> s{_uaAccountId = a})
uaResult :: Lens' UnprocessedAccount Text
uaResult = lens _uaResult (\ s a -> s{_uaResult = a})
instance FromJSON UnprocessedAccount where
parseJSON
= withObject "UnprocessedAccount"
(\ x ->
UnprocessedAccount' <$>
(x .: "accountId") <*> (x .: "result"))
instance Hashable UnprocessedAccount where
instance NFData UnprocessedAccount where