{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.SecurityCenter.Types.Product where
import Network.Google.Prelude
import Network.Google.SecurityCenter.Types.Sum
data Status =
Status'
{ _sDetails :: !(Maybe [StatusDetailsItem])
, _sCode :: !(Maybe (Textual Int32))
, _sMessage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
status
:: Status
status = Status' {_sDetails = Nothing, _sCode = Nothing, _sMessage = Nothing}
sDetails :: Lens' Status [StatusDetailsItem]
sDetails
= lens _sDetails (\ s a -> s{_sDetails = a}) .
_Default
. _Coerce
sCode :: Lens' Status (Maybe Int32)
sCode
= lens _sCode (\ s a -> s{_sCode = a}) .
mapping _Coerce
sMessage :: Lens' Status (Maybe Text)
sMessage = lens _sMessage (\ s a -> s{_sMessage = a})
instance FromJSON Status where
parseJSON
= withObject "Status"
(\ o ->
Status' <$>
(o .:? "details" .!= mempty) <*> (o .:? "code") <*>
(o .:? "message"))
instance ToJSON Status where
toJSON Status'{..}
= object
(catMaybes
[("details" .=) <$> _sDetails,
("code" .=) <$> _sCode,
("message" .=) <$> _sMessage])
data ListFindingsResponse =
ListFindingsResponse'
{ _lfrReadTime :: !(Maybe DateTime')
, _lfrNextPageToken :: !(Maybe Text)
, _lfrTotalSize :: !(Maybe (Textual Int32))
, _lfrListFindingsResults :: !(Maybe [ListFindingsResult])
}
deriving (Eq, Show, Data, Typeable, Generic)
listFindingsResponse
:: ListFindingsResponse
listFindingsResponse =
ListFindingsResponse'
{ _lfrReadTime = Nothing
, _lfrNextPageToken = Nothing
, _lfrTotalSize = Nothing
, _lfrListFindingsResults = Nothing
}
lfrReadTime :: Lens' ListFindingsResponse (Maybe UTCTime)
lfrReadTime
= lens _lfrReadTime (\ s a -> s{_lfrReadTime = a}) .
mapping _DateTime
lfrNextPageToken :: Lens' ListFindingsResponse (Maybe Text)
lfrNextPageToken
= lens _lfrNextPageToken
(\ s a -> s{_lfrNextPageToken = a})
lfrTotalSize :: Lens' ListFindingsResponse (Maybe Int32)
lfrTotalSize
= lens _lfrTotalSize (\ s a -> s{_lfrTotalSize = a})
. mapping _Coerce
lfrListFindingsResults :: Lens' ListFindingsResponse [ListFindingsResult]
lfrListFindingsResults
= lens _lfrListFindingsResults
(\ s a -> s{_lfrListFindingsResults = a})
. _Default
. _Coerce
instance FromJSON ListFindingsResponse where
parseJSON
= withObject "ListFindingsResponse"
(\ o ->
ListFindingsResponse' <$>
(o .:? "readTime") <*> (o .:? "nextPageToken") <*>
(o .:? "totalSize")
<*> (o .:? "listFindingsResults" .!= mempty))
instance ToJSON ListFindingsResponse where
toJSON ListFindingsResponse'{..}
= object
(catMaybes
[("readTime" .=) <$> _lfrReadTime,
("nextPageToken" .=) <$> _lfrNextPageToken,
("totalSize" .=) <$> _lfrTotalSize,
("listFindingsResults" .=) <$>
_lfrListFindingsResults])
data AuditConfig =
AuditConfig'
{ _acService :: !(Maybe Text)
, _acAuditLogConfigs :: !(Maybe [AuditLogConfig])
}
deriving (Eq, Show, Data, Typeable, Generic)
auditConfig
:: AuditConfig
auditConfig = AuditConfig' {_acService = Nothing, _acAuditLogConfigs = Nothing}
acService :: Lens' AuditConfig (Maybe Text)
acService
= lens _acService (\ s a -> s{_acService = a})
acAuditLogConfigs :: Lens' AuditConfig [AuditLogConfig]
acAuditLogConfigs
= lens _acAuditLogConfigs
(\ s a -> s{_acAuditLogConfigs = a})
. _Default
. _Coerce
instance FromJSON AuditConfig where
parseJSON
= withObject "AuditConfig"
(\ o ->
AuditConfig' <$>
(o .:? "service") <*>
(o .:? "auditLogConfigs" .!= mempty))
instance ToJSON AuditConfig where
toJSON AuditConfig'{..}
= object
(catMaybes
[("service" .=) <$> _acService,
("auditLogConfigs" .=) <$> _acAuditLogConfigs])
data Expr =
Expr'
{ _eLocation :: !(Maybe Text)
, _eExpression :: !(Maybe Text)
, _eTitle :: !(Maybe Text)
, _eDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
expr
:: Expr
expr =
Expr'
{ _eLocation = Nothing
, _eExpression = Nothing
, _eTitle = Nothing
, _eDescription = Nothing
}
eLocation :: Lens' Expr (Maybe Text)
eLocation
= lens _eLocation (\ s a -> s{_eLocation = a})
eExpression :: Lens' Expr (Maybe Text)
eExpression
= lens _eExpression (\ s a -> s{_eExpression = a})
eTitle :: Lens' Expr (Maybe Text)
eTitle = lens _eTitle (\ s a -> s{_eTitle = a})
eDescription :: Lens' Expr (Maybe Text)
eDescription
= lens _eDescription (\ s a -> s{_eDescription = a})
instance FromJSON Expr where
parseJSON
= withObject "Expr"
(\ o ->
Expr' <$>
(o .:? "location") <*> (o .:? "expression") <*>
(o .:? "title")
<*> (o .:? "description"))
instance ToJSON Expr where
toJSON Expr'{..}
= object
(catMaybes
[("location" .=) <$> _eLocation,
("expression" .=) <$> _eExpression,
("title" .=) <$> _eTitle,
("description" .=) <$> _eDescription])
data ListOperationsResponse =
ListOperationsResponse'
{ _lorNextPageToken :: !(Maybe Text)
, _lorOperations :: !(Maybe [Operation])
}
deriving (Eq, Show, Data, Typeable, Generic)
listOperationsResponse
:: ListOperationsResponse
listOperationsResponse =
ListOperationsResponse'
{_lorNextPageToken = Nothing, _lorOperations = Nothing}
lorNextPageToken :: Lens' ListOperationsResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
lorOperations :: Lens' ListOperationsResponse [Operation]
lorOperations
= lens _lorOperations
(\ s a -> s{_lorOperations = a})
. _Default
. _Coerce
instance FromJSON ListOperationsResponse where
parseJSON
= withObject "ListOperationsResponse"
(\ o ->
ListOperationsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "operations" .!= mempty))
instance ToJSON ListOperationsResponse where
toJSON ListOperationsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lorNextPageToken,
("operations" .=) <$> _lorOperations])
data GetIAMPolicyRequest =
GetIAMPolicyRequest'
deriving (Eq, Show, Data, Typeable, Generic)
getIAMPolicyRequest
:: GetIAMPolicyRequest
getIAMPolicyRequest = GetIAMPolicyRequest'
instance FromJSON GetIAMPolicyRequest where
parseJSON
= withObject "GetIAMPolicyRequest"
(\ o -> pure GetIAMPolicyRequest')
instance ToJSON GetIAMPolicyRequest where
toJSON = const emptyObject
data GroupFindingsResponse =
GroupFindingsResponse'
{ _gfrReadTime :: !(Maybe DateTime')
, _gfrNextPageToken :: !(Maybe Text)
, _gfrTotalSize :: !(Maybe (Textual Int32))
, _gfrGroupByResults :: !(Maybe [GroupResult])
}
deriving (Eq, Show, Data, Typeable, Generic)
groupFindingsResponse
:: GroupFindingsResponse
groupFindingsResponse =
GroupFindingsResponse'
{ _gfrReadTime = Nothing
, _gfrNextPageToken = Nothing
, _gfrTotalSize = Nothing
, _gfrGroupByResults = Nothing
}
gfrReadTime :: Lens' GroupFindingsResponse (Maybe UTCTime)
gfrReadTime
= lens _gfrReadTime (\ s a -> s{_gfrReadTime = a}) .
mapping _DateTime
gfrNextPageToken :: Lens' GroupFindingsResponse (Maybe Text)
gfrNextPageToken
= lens _gfrNextPageToken
(\ s a -> s{_gfrNextPageToken = a})
gfrTotalSize :: Lens' GroupFindingsResponse (Maybe Int32)
gfrTotalSize
= lens _gfrTotalSize (\ s a -> s{_gfrTotalSize = a})
. mapping _Coerce
gfrGroupByResults :: Lens' GroupFindingsResponse [GroupResult]
gfrGroupByResults
= lens _gfrGroupByResults
(\ s a -> s{_gfrGroupByResults = a})
. _Default
. _Coerce
instance FromJSON GroupFindingsResponse where
parseJSON
= withObject "GroupFindingsResponse"
(\ o ->
GroupFindingsResponse' <$>
(o .:? "readTime") <*> (o .:? "nextPageToken") <*>
(o .:? "totalSize")
<*> (o .:? "groupByResults" .!= mempty))
instance ToJSON GroupFindingsResponse where
toJSON GroupFindingsResponse'{..}
= object
(catMaybes
[("readTime" .=) <$> _gfrReadTime,
("nextPageToken" .=) <$> _gfrNextPageToken,
("totalSize" .=) <$> _gfrTotalSize,
("groupByResults" .=) <$> _gfrGroupByResults])
data RunAssetDiscoveryRequest =
RunAssetDiscoveryRequest'
deriving (Eq, Show, Data, Typeable, Generic)
runAssetDiscoveryRequest
:: RunAssetDiscoveryRequest
runAssetDiscoveryRequest = RunAssetDiscoveryRequest'
instance FromJSON RunAssetDiscoveryRequest where
parseJSON
= withObject "RunAssetDiscoveryRequest"
(\ o -> pure RunAssetDiscoveryRequest')
instance ToJSON RunAssetDiscoveryRequest where
toJSON = const emptyObject
data Operation =
Operation'
{ _oDone :: !(Maybe Bool)
, _oError :: !(Maybe Status)
, _oResponse :: !(Maybe OperationResponse)
, _oName :: !(Maybe Text)
, _oMetadata :: !(Maybe OperationMetadata)
}
deriving (Eq, Show, Data, Typeable, Generic)
operation
:: Operation
operation =
Operation'
{ _oDone = Nothing
, _oError = Nothing
, _oResponse = Nothing
, _oName = Nothing
, _oMetadata = Nothing
}
oDone :: Lens' Operation (Maybe Bool)
oDone = lens _oDone (\ s a -> s{_oDone = a})
oError :: Lens' Operation (Maybe Status)
oError = lens _oError (\ s a -> s{_oError = a})
oResponse :: Lens' Operation (Maybe OperationResponse)
oResponse
= lens _oResponse (\ s a -> s{_oResponse = a})
oName :: Lens' Operation (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oMetadata :: Lens' Operation (Maybe OperationMetadata)
oMetadata
= lens _oMetadata (\ s a -> s{_oMetadata = a})
instance FromJSON Operation where
parseJSON
= withObject "Operation"
(\ o ->
Operation' <$>
(o .:? "done") <*> (o .:? "error") <*>
(o .:? "response")
<*> (o .:? "name")
<*> (o .:? "metadata"))
instance ToJSON Operation where
toJSON Operation'{..}
= object
(catMaybes
[("done" .=) <$> _oDone, ("error" .=) <$> _oError,
("response" .=) <$> _oResponse,
("name" .=) <$> _oName,
("metadata" .=) <$> _oMetadata])
data Finding =
Finding'
{ _fParent :: !(Maybe Text)
, _fSourceProperties :: !(Maybe FindingSourceProperties)
, _fState :: !(Maybe FindingState)
, _fResourceName :: !(Maybe Text)
, _fSecurityMarks :: !(Maybe SecurityMarks)
, _fCategory :: !(Maybe Text)
, _fExternalURI :: !(Maybe Text)
, _fEventTime :: !(Maybe DateTime')
, _fName :: !(Maybe Text)
, _fCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
finding
:: Finding
finding =
Finding'
{ _fParent = Nothing
, _fSourceProperties = Nothing
, _fState = Nothing
, _fResourceName = Nothing
, _fSecurityMarks = Nothing
, _fCategory = Nothing
, _fExternalURI = Nothing
, _fEventTime = Nothing
, _fName = Nothing
, _fCreateTime = Nothing
}
fParent :: Lens' Finding (Maybe Text)
fParent = lens _fParent (\ s a -> s{_fParent = a})
fSourceProperties :: Lens' Finding (Maybe FindingSourceProperties)
fSourceProperties
= lens _fSourceProperties
(\ s a -> s{_fSourceProperties = a})
fState :: Lens' Finding (Maybe FindingState)
fState = lens _fState (\ s a -> s{_fState = a})
fResourceName :: Lens' Finding (Maybe Text)
fResourceName
= lens _fResourceName
(\ s a -> s{_fResourceName = a})
fSecurityMarks :: Lens' Finding (Maybe SecurityMarks)
fSecurityMarks
= lens _fSecurityMarks
(\ s a -> s{_fSecurityMarks = a})
fCategory :: Lens' Finding (Maybe Text)
fCategory
= lens _fCategory (\ s a -> s{_fCategory = a})
fExternalURI :: Lens' Finding (Maybe Text)
fExternalURI
= lens _fExternalURI (\ s a -> s{_fExternalURI = a})
fEventTime :: Lens' Finding (Maybe UTCTime)
fEventTime
= lens _fEventTime (\ s a -> s{_fEventTime = a}) .
mapping _DateTime
fName :: Lens' Finding (Maybe Text)
fName = lens _fName (\ s a -> s{_fName = a})
fCreateTime :: Lens' Finding (Maybe UTCTime)
fCreateTime
= lens _fCreateTime (\ s a -> s{_fCreateTime = a}) .
mapping _DateTime
instance FromJSON Finding where
parseJSON
= withObject "Finding"
(\ o ->
Finding' <$>
(o .:? "parent") <*> (o .:? "sourceProperties") <*>
(o .:? "state")
<*> (o .:? "resourceName")
<*> (o .:? "securityMarks")
<*> (o .:? "category")
<*> (o .:? "externalUri")
<*> (o .:? "eventTime")
<*> (o .:? "name")
<*> (o .:? "createTime"))
instance ToJSON Finding where
toJSON Finding'{..}
= object
(catMaybes
[("parent" .=) <$> _fParent,
("sourceProperties" .=) <$> _fSourceProperties,
("state" .=) <$> _fState,
("resourceName" .=) <$> _fResourceName,
("securityMarks" .=) <$> _fSecurityMarks,
("category" .=) <$> _fCategory,
("externalUri" .=) <$> _fExternalURI,
("eventTime" .=) <$> _fEventTime,
("name" .=) <$> _fName,
("createTime" .=) <$> _fCreateTime])
data Empty =
Empty'
deriving (Eq, Show, Data, Typeable, Generic)
empty
:: Empty
empty = Empty'
instance FromJSON Empty where
parseJSON = withObject "Empty" (\ o -> pure Empty')
instance ToJSON Empty where
toJSON = const emptyObject
data ListFindingsResult =
ListFindingsResult'
{ _lfrFinding :: !(Maybe Finding)
, _lfrStateChange :: !(Maybe ListFindingsResultStateChange)
}
deriving (Eq, Show, Data, Typeable, Generic)
listFindingsResult
:: ListFindingsResult
listFindingsResult =
ListFindingsResult' {_lfrFinding = Nothing, _lfrStateChange = Nothing}
lfrFinding :: Lens' ListFindingsResult (Maybe Finding)
lfrFinding
= lens _lfrFinding (\ s a -> s{_lfrFinding = a})
lfrStateChange :: Lens' ListFindingsResult (Maybe ListFindingsResultStateChange)
lfrStateChange
= lens _lfrStateChange
(\ s a -> s{_lfrStateChange = a})
instance FromJSON ListFindingsResult where
parseJSON
= withObject "ListFindingsResult"
(\ o ->
ListFindingsResult' <$>
(o .:? "finding") <*> (o .:? "stateChange"))
instance ToJSON ListFindingsResult where
toJSON ListFindingsResult'{..}
= object
(catMaybes
[("finding" .=) <$> _lfrFinding,
("stateChange" .=) <$> _lfrStateChange])
data GroupAssetsRequest =
GroupAssetsRequest'
{ _garGroupBy :: !(Maybe Text)
, _garReadTime :: !(Maybe DateTime')
, _garFilter :: !(Maybe Text)
, _garPageToken :: !(Maybe Text)
, _garPageSize :: !(Maybe (Textual Int32))
, _garCompareDuration :: !(Maybe GDuration)
}
deriving (Eq, Show, Data, Typeable, Generic)
groupAssetsRequest
:: GroupAssetsRequest
groupAssetsRequest =
GroupAssetsRequest'
{ _garGroupBy = Nothing
, _garReadTime = Nothing
, _garFilter = Nothing
, _garPageToken = Nothing
, _garPageSize = Nothing
, _garCompareDuration = Nothing
}
garGroupBy :: Lens' GroupAssetsRequest (Maybe Text)
garGroupBy
= lens _garGroupBy (\ s a -> s{_garGroupBy = a})
garReadTime :: Lens' GroupAssetsRequest (Maybe UTCTime)
garReadTime
= lens _garReadTime (\ s a -> s{_garReadTime = a}) .
mapping _DateTime
garFilter :: Lens' GroupAssetsRequest (Maybe Text)
garFilter
= lens _garFilter (\ s a -> s{_garFilter = a})
garPageToken :: Lens' GroupAssetsRequest (Maybe Text)
garPageToken
= lens _garPageToken (\ s a -> s{_garPageToken = a})
garPageSize :: Lens' GroupAssetsRequest (Maybe Int32)
garPageSize
= lens _garPageSize (\ s a -> s{_garPageSize = a}) .
mapping _Coerce
garCompareDuration :: Lens' GroupAssetsRequest (Maybe Scientific)
garCompareDuration
= lens _garCompareDuration
(\ s a -> s{_garCompareDuration = a})
. mapping _GDuration
instance FromJSON GroupAssetsRequest where
parseJSON
= withObject "GroupAssetsRequest"
(\ o ->
GroupAssetsRequest' <$>
(o .:? "groupBy") <*> (o .:? "readTime") <*>
(o .:? "filter")
<*> (o .:? "pageToken")
<*> (o .:? "pageSize")
<*> (o .:? "compareDuration"))
instance ToJSON GroupAssetsRequest where
toJSON GroupAssetsRequest'{..}
= object
(catMaybes
[("groupBy" .=) <$> _garGroupBy,
("readTime" .=) <$> _garReadTime,
("filter" .=) <$> _garFilter,
("pageToken" .=) <$> _garPageToken,
("pageSize" .=) <$> _garPageSize,
("compareDuration" .=) <$> _garCompareDuration])
data GroupFindingsRequest =
GroupFindingsRequest'
{ _gGroupBy :: !(Maybe Text)
, _gReadTime :: !(Maybe DateTime')
, _gFilter :: !(Maybe Text)
, _gPageToken :: !(Maybe Text)
, _gPageSize :: !(Maybe (Textual Int32))
, _gCompareDuration :: !(Maybe GDuration)
}
deriving (Eq, Show, Data, Typeable, Generic)
groupFindingsRequest
:: GroupFindingsRequest
groupFindingsRequest =
GroupFindingsRequest'
{ _gGroupBy = Nothing
, _gReadTime = Nothing
, _gFilter = Nothing
, _gPageToken = Nothing
, _gPageSize = Nothing
, _gCompareDuration = Nothing
}
gGroupBy :: Lens' GroupFindingsRequest (Maybe Text)
gGroupBy = lens _gGroupBy (\ s a -> s{_gGroupBy = a})
gReadTime :: Lens' GroupFindingsRequest (Maybe UTCTime)
gReadTime
= lens _gReadTime (\ s a -> s{_gReadTime = a}) .
mapping _DateTime
gFilter :: Lens' GroupFindingsRequest (Maybe Text)
gFilter = lens _gFilter (\ s a -> s{_gFilter = a})
gPageToken :: Lens' GroupFindingsRequest (Maybe Text)
gPageToken
= lens _gPageToken (\ s a -> s{_gPageToken = a})
gPageSize :: Lens' GroupFindingsRequest (Maybe Int32)
gPageSize
= lens _gPageSize (\ s a -> s{_gPageSize = a}) .
mapping _Coerce
gCompareDuration :: Lens' GroupFindingsRequest (Maybe Scientific)
gCompareDuration
= lens _gCompareDuration
(\ s a -> s{_gCompareDuration = a})
. mapping _GDuration
instance FromJSON GroupFindingsRequest where
parseJSON
= withObject "GroupFindingsRequest"
(\ o ->
GroupFindingsRequest' <$>
(o .:? "groupBy") <*> (o .:? "readTime") <*>
(o .:? "filter")
<*> (o .:? "pageToken")
<*> (o .:? "pageSize")
<*> (o .:? "compareDuration"))
instance ToJSON GroupFindingsRequest where
toJSON GroupFindingsRequest'{..}
= object
(catMaybes
[("groupBy" .=) <$> _gGroupBy,
("readTime" .=) <$> _gReadTime,
("filter" .=) <$> _gFilter,
("pageToken" .=) <$> _gPageToken,
("pageSize" .=) <$> _gPageSize,
("compareDuration" .=) <$> _gCompareDuration])
data AssetDiscoveryConfig =
AssetDiscoveryConfig'
{ _adcInclusionMode :: !(Maybe AssetDiscoveryConfigInclusionMode)
, _adcProjectIds :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
assetDiscoveryConfig
:: AssetDiscoveryConfig
assetDiscoveryConfig =
AssetDiscoveryConfig' {_adcInclusionMode = Nothing, _adcProjectIds = Nothing}
adcInclusionMode :: Lens' AssetDiscoveryConfig (Maybe AssetDiscoveryConfigInclusionMode)
adcInclusionMode
= lens _adcInclusionMode
(\ s a -> s{_adcInclusionMode = a})
adcProjectIds :: Lens' AssetDiscoveryConfig [Text]
adcProjectIds
= lens _adcProjectIds
(\ s a -> s{_adcProjectIds = a})
. _Default
. _Coerce
instance FromJSON AssetDiscoveryConfig where
parseJSON
= withObject "AssetDiscoveryConfig"
(\ o ->
AssetDiscoveryConfig' <$>
(o .:? "inclusionMode") <*>
(o .:? "projectIds" .!= mempty))
instance ToJSON AssetDiscoveryConfig where
toJSON AssetDiscoveryConfig'{..}
= object
(catMaybes
[("inclusionMode" .=) <$> _adcInclusionMode,
("projectIds" .=) <$> _adcProjectIds])
data Asset =
Asset'
{ _aSecurityMarks :: !(Maybe SecurityMarks)
, _aResourceProperties :: !(Maybe AssetResourceProperties)
, _aUpdateTime :: !(Maybe DateTime')
, _aSecurityCenterProperties :: !(Maybe SecurityCenterProperties)
, _aName :: !(Maybe Text)
, _aIAMPolicy :: !(Maybe IAMPolicy)
, _aCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
asset
:: Asset
asset =
Asset'
{ _aSecurityMarks = Nothing
, _aResourceProperties = Nothing
, _aUpdateTime = Nothing
, _aSecurityCenterProperties = Nothing
, _aName = Nothing
, _aIAMPolicy = Nothing
, _aCreateTime = Nothing
}
aSecurityMarks :: Lens' Asset (Maybe SecurityMarks)
aSecurityMarks
= lens _aSecurityMarks
(\ s a -> s{_aSecurityMarks = a})
aResourceProperties :: Lens' Asset (Maybe AssetResourceProperties)
aResourceProperties
= lens _aResourceProperties
(\ s a -> s{_aResourceProperties = a})
aUpdateTime :: Lens' Asset (Maybe UTCTime)
aUpdateTime
= lens _aUpdateTime (\ s a -> s{_aUpdateTime = a}) .
mapping _DateTime
aSecurityCenterProperties :: Lens' Asset (Maybe SecurityCenterProperties)
aSecurityCenterProperties
= lens _aSecurityCenterProperties
(\ s a -> s{_aSecurityCenterProperties = a})
aName :: Lens' Asset (Maybe Text)
aName = lens _aName (\ s a -> s{_aName = a})
aIAMPolicy :: Lens' Asset (Maybe IAMPolicy)
aIAMPolicy
= lens _aIAMPolicy (\ s a -> s{_aIAMPolicy = a})
aCreateTime :: Lens' Asset (Maybe UTCTime)
aCreateTime
= lens _aCreateTime (\ s a -> s{_aCreateTime = a}) .
mapping _DateTime
instance FromJSON Asset where
parseJSON
= withObject "Asset"
(\ o ->
Asset' <$>
(o .:? "securityMarks") <*>
(o .:? "resourceProperties")
<*> (o .:? "updateTime")
<*> (o .:? "securityCenterProperties")
<*> (o .:? "name")
<*> (o .:? "iamPolicy")
<*> (o .:? "createTime"))
instance ToJSON Asset where
toJSON Asset'{..}
= object
(catMaybes
[("securityMarks" .=) <$> _aSecurityMarks,
("resourceProperties" .=) <$> _aResourceProperties,
("updateTime" .=) <$> _aUpdateTime,
("securityCenterProperties" .=) <$>
_aSecurityCenterProperties,
("name" .=) <$> _aName,
("iamPolicy" .=) <$> _aIAMPolicy,
("createTime" .=) <$> _aCreateTime])
data SecurityMarks =
SecurityMarks'
{ _smName :: !(Maybe Text)
, _smMarks :: !(Maybe SecurityMarksMarks)
}
deriving (Eq, Show, Data, Typeable, Generic)
securityMarks
:: SecurityMarks
securityMarks = SecurityMarks' {_smName = Nothing, _smMarks = Nothing}
smName :: Lens' SecurityMarks (Maybe Text)
smName = lens _smName (\ s a -> s{_smName = a})
smMarks :: Lens' SecurityMarks (Maybe SecurityMarksMarks)
smMarks = lens _smMarks (\ s a -> s{_smMarks = a})
instance FromJSON SecurityMarks where
parseJSON
= withObject "SecurityMarks"
(\ o ->
SecurityMarks' <$>
(o .:? "name") <*> (o .:? "marks"))
instance ToJSON SecurityMarks where
toJSON SecurityMarks'{..}
= object
(catMaybes
[("name" .=) <$> _smName, ("marks" .=) <$> _smMarks])
newtype AssetResourceProperties =
AssetResourceProperties'
{ _arpAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
assetResourceProperties
:: HashMap Text JSONValue
-> AssetResourceProperties
assetResourceProperties pArpAddtional_ =
AssetResourceProperties' {_arpAddtional = _Coerce # pArpAddtional_}
arpAddtional :: Lens' AssetResourceProperties (HashMap Text JSONValue)
arpAddtional
= lens _arpAddtional (\ s a -> s{_arpAddtional = a})
. _Coerce
instance FromJSON AssetResourceProperties where
parseJSON
= withObject "AssetResourceProperties"
(\ o ->
AssetResourceProperties' <$> (parseJSONObject o))
instance ToJSON AssetResourceProperties where
toJSON = toJSON . _arpAddtional
newtype StatusDetailsItem =
StatusDetailsItem'
{ _sdiAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
statusDetailsItem
:: HashMap Text JSONValue
-> StatusDetailsItem
statusDetailsItem pSdiAddtional_ =
StatusDetailsItem' {_sdiAddtional = _Coerce # pSdiAddtional_}
sdiAddtional :: Lens' StatusDetailsItem (HashMap Text JSONValue)
sdiAddtional
= lens _sdiAddtional (\ s a -> s{_sdiAddtional = a})
. _Coerce
instance FromJSON StatusDetailsItem where
parseJSON
= withObject "StatusDetailsItem"
(\ o -> StatusDetailsItem' <$> (parseJSONObject o))
instance ToJSON StatusDetailsItem where
toJSON = toJSON . _sdiAddtional
data OrganizationSettings =
OrganizationSettings'
{ _osAssetDiscoveryConfig :: !(Maybe AssetDiscoveryConfig)
, _osEnableAssetDiscovery :: !(Maybe Bool)
, _osName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
organizationSettings
:: OrganizationSettings
organizationSettings =
OrganizationSettings'
{ _osAssetDiscoveryConfig = Nothing
, _osEnableAssetDiscovery = Nothing
, _osName = Nothing
}
osAssetDiscoveryConfig :: Lens' OrganizationSettings (Maybe AssetDiscoveryConfig)
osAssetDiscoveryConfig
= lens _osAssetDiscoveryConfig
(\ s a -> s{_osAssetDiscoveryConfig = a})
osEnableAssetDiscovery :: Lens' OrganizationSettings (Maybe Bool)
osEnableAssetDiscovery
= lens _osEnableAssetDiscovery
(\ s a -> s{_osEnableAssetDiscovery = a})
osName :: Lens' OrganizationSettings (Maybe Text)
osName = lens _osName (\ s a -> s{_osName = a})
instance FromJSON OrganizationSettings where
parseJSON
= withObject "OrganizationSettings"
(\ o ->
OrganizationSettings' <$>
(o .:? "assetDiscoveryConfig") <*>
(o .:? "enableAssetDiscovery")
<*> (o .:? "name"))
instance ToJSON OrganizationSettings where
toJSON OrganizationSettings'{..}
= object
(catMaybes
[("assetDiscoveryConfig" .=) <$>
_osAssetDiscoveryConfig,
("enableAssetDiscovery" .=) <$>
_osEnableAssetDiscovery,
("name" .=) <$> _osName])
data SetIAMPolicyRequest =
SetIAMPolicyRequest'
{ _siprUpdateMask :: !(Maybe GFieldMask)
, _siprPolicy :: !(Maybe Policy)
}
deriving (Eq, Show, Data, Typeable, Generic)
setIAMPolicyRequest
:: SetIAMPolicyRequest
setIAMPolicyRequest =
SetIAMPolicyRequest' {_siprUpdateMask = Nothing, _siprPolicy = Nothing}
siprUpdateMask :: Lens' SetIAMPolicyRequest (Maybe GFieldMask)
siprUpdateMask
= lens _siprUpdateMask
(\ s a -> s{_siprUpdateMask = a})
siprPolicy :: Lens' SetIAMPolicyRequest (Maybe Policy)
siprPolicy
= lens _siprPolicy (\ s a -> s{_siprPolicy = a})
instance FromJSON SetIAMPolicyRequest where
parseJSON
= withObject "SetIAMPolicyRequest"
(\ o ->
SetIAMPolicyRequest' <$>
(o .:? "updateMask") <*> (o .:? "policy"))
instance ToJSON SetIAMPolicyRequest where
toJSON SetIAMPolicyRequest'{..}
= object
(catMaybes
[("updateMask" .=) <$> _siprUpdateMask,
("policy" .=) <$> _siprPolicy])
newtype FindingSourceProperties =
FindingSourceProperties'
{ _fspAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
findingSourceProperties
:: HashMap Text JSONValue
-> FindingSourceProperties
findingSourceProperties pFspAddtional_ =
FindingSourceProperties' {_fspAddtional = _Coerce # pFspAddtional_}
fspAddtional :: Lens' FindingSourceProperties (HashMap Text JSONValue)
fspAddtional
= lens _fspAddtional (\ s a -> s{_fspAddtional = a})
. _Coerce
instance FromJSON FindingSourceProperties where
parseJSON
= withObject "FindingSourceProperties"
(\ o ->
FindingSourceProperties' <$> (parseJSONObject o))
instance ToJSON FindingSourceProperties where
toJSON = toJSON . _fspAddtional
data SetFindingStateRequest =
SetFindingStateRequest'
{ _sfsrState :: !(Maybe SetFindingStateRequestState)
, _sfsrStartTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
setFindingStateRequest
:: SetFindingStateRequest
setFindingStateRequest =
SetFindingStateRequest' {_sfsrState = Nothing, _sfsrStartTime = Nothing}
sfsrState :: Lens' SetFindingStateRequest (Maybe SetFindingStateRequestState)
sfsrState
= lens _sfsrState (\ s a -> s{_sfsrState = a})
sfsrStartTime :: Lens' SetFindingStateRequest (Maybe UTCTime)
sfsrStartTime
= lens _sfsrStartTime
(\ s a -> s{_sfsrStartTime = a})
. mapping _DateTime
instance FromJSON SetFindingStateRequest where
parseJSON
= withObject "SetFindingStateRequest"
(\ o ->
SetFindingStateRequest' <$>
(o .:? "state") <*> (o .:? "startTime"))
instance ToJSON SetFindingStateRequest where
toJSON SetFindingStateRequest'{..}
= object
(catMaybes
[("state" .=) <$> _sfsrState,
("startTime" .=) <$> _sfsrStartTime])
data SecurityCenterProperties =
SecurityCenterProperties'
{ _scpResourceType :: !(Maybe Text)
, _scpResourceName :: !(Maybe Text)
, _scpResourceParent :: !(Maybe Text)
, _scpResourceProject :: !(Maybe Text)
, _scpResourceOwners :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
securityCenterProperties
:: SecurityCenterProperties
securityCenterProperties =
SecurityCenterProperties'
{ _scpResourceType = Nothing
, _scpResourceName = Nothing
, _scpResourceParent = Nothing
, _scpResourceProject = Nothing
, _scpResourceOwners = Nothing
}
scpResourceType :: Lens' SecurityCenterProperties (Maybe Text)
scpResourceType
= lens _scpResourceType
(\ s a -> s{_scpResourceType = a})
scpResourceName :: Lens' SecurityCenterProperties (Maybe Text)
scpResourceName
= lens _scpResourceName
(\ s a -> s{_scpResourceName = a})
scpResourceParent :: Lens' SecurityCenterProperties (Maybe Text)
scpResourceParent
= lens _scpResourceParent
(\ s a -> s{_scpResourceParent = a})
scpResourceProject :: Lens' SecurityCenterProperties (Maybe Text)
scpResourceProject
= lens _scpResourceProject
(\ s a -> s{_scpResourceProject = a})
scpResourceOwners :: Lens' SecurityCenterProperties [Text]
scpResourceOwners
= lens _scpResourceOwners
(\ s a -> s{_scpResourceOwners = a})
. _Default
. _Coerce
instance FromJSON SecurityCenterProperties where
parseJSON
= withObject "SecurityCenterProperties"
(\ o ->
SecurityCenterProperties' <$>
(o .:? "resourceType") <*> (o .:? "resourceName") <*>
(o .:? "resourceParent")
<*> (o .:? "resourceProject")
<*> (o .:? "resourceOwners" .!= mempty))
instance ToJSON SecurityCenterProperties where
toJSON SecurityCenterProperties'{..}
= object
(catMaybes
[("resourceType" .=) <$> _scpResourceType,
("resourceName" .=) <$> _scpResourceName,
("resourceParent" .=) <$> _scpResourceParent,
("resourceProject" .=) <$> _scpResourceProject,
("resourceOwners" .=) <$> _scpResourceOwners])
data GroupAssetsResponse =
GroupAssetsResponse'
{ _groReadTime :: !(Maybe DateTime')
, _groNextPageToken :: !(Maybe Text)
, _groTotalSize :: !(Maybe (Textual Int32))
, _groGroupByResults :: !(Maybe [GroupResult])
}
deriving (Eq, Show, Data, Typeable, Generic)
groupAssetsResponse
:: GroupAssetsResponse
groupAssetsResponse =
GroupAssetsResponse'
{ _groReadTime = Nothing
, _groNextPageToken = Nothing
, _groTotalSize = Nothing
, _groGroupByResults = Nothing
}
groReadTime :: Lens' GroupAssetsResponse (Maybe UTCTime)
groReadTime
= lens _groReadTime (\ s a -> s{_groReadTime = a}) .
mapping _DateTime
groNextPageToken :: Lens' GroupAssetsResponse (Maybe Text)
groNextPageToken
= lens _groNextPageToken
(\ s a -> s{_groNextPageToken = a})
groTotalSize :: Lens' GroupAssetsResponse (Maybe Int32)
groTotalSize
= lens _groTotalSize (\ s a -> s{_groTotalSize = a})
. mapping _Coerce
groGroupByResults :: Lens' GroupAssetsResponse [GroupResult]
groGroupByResults
= lens _groGroupByResults
(\ s a -> s{_groGroupByResults = a})
. _Default
. _Coerce
instance FromJSON GroupAssetsResponse where
parseJSON
= withObject "GroupAssetsResponse"
(\ o ->
GroupAssetsResponse' <$>
(o .:? "readTime") <*> (o .:? "nextPageToken") <*>
(o .:? "totalSize")
<*> (o .:? "groupByResults" .!= mempty))
instance ToJSON GroupAssetsResponse where
toJSON GroupAssetsResponse'{..}
= object
(catMaybes
[("readTime" .=) <$> _groReadTime,
("nextPageToken" .=) <$> _groNextPageToken,
("totalSize" .=) <$> _groTotalSize,
("groupByResults" .=) <$> _groGroupByResults])
data ListSourcesResponse =
ListSourcesResponse'
{ _lsrNextPageToken :: !(Maybe Text)
, _lsrSources :: !(Maybe [Source])
}
deriving (Eq, Show, Data, Typeable, Generic)
listSourcesResponse
:: ListSourcesResponse
listSourcesResponse =
ListSourcesResponse' {_lsrNextPageToken = Nothing, _lsrSources = Nothing}
lsrNextPageToken :: Lens' ListSourcesResponse (Maybe Text)
lsrNextPageToken
= lens _lsrNextPageToken
(\ s a -> s{_lsrNextPageToken = a})
lsrSources :: Lens' ListSourcesResponse [Source]
lsrSources
= lens _lsrSources (\ s a -> s{_lsrSources = a}) .
_Default
. _Coerce
instance FromJSON ListSourcesResponse where
parseJSON
= withObject "ListSourcesResponse"
(\ o ->
ListSourcesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "sources" .!= mempty))
instance ToJSON ListSourcesResponse where
toJSON ListSourcesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lsrNextPageToken,
("sources" .=) <$> _lsrSources])
newtype GroupResultProperties =
GroupResultProperties'
{ _grpAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
groupResultProperties
:: HashMap Text JSONValue
-> GroupResultProperties
groupResultProperties pGrpAddtional_ =
GroupResultProperties' {_grpAddtional = _Coerce # pGrpAddtional_}
grpAddtional :: Lens' GroupResultProperties (HashMap Text JSONValue)
grpAddtional
= lens _grpAddtional (\ s a -> s{_grpAddtional = a})
. _Coerce
instance FromJSON GroupResultProperties where
parseJSON
= withObject "GroupResultProperties"
(\ o ->
GroupResultProperties' <$> (parseJSONObject o))
instance ToJSON GroupResultProperties where
toJSON = toJSON . _grpAddtional
data GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse =
GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse'
{ _gcsvradrState :: !(Maybe GoogleCloudSecuritycenterV1RunAssetDiscoveryResponseState)
, _gcsvradrDuration :: !(Maybe GDuration)
}
deriving (Eq, Show, Data, Typeable, Generic)
googleCloudSecuritycenterV1RunAssetDiscoveryResponse
:: GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse
googleCloudSecuritycenterV1RunAssetDiscoveryResponse =
GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse'
{_gcsvradrState = Nothing, _gcsvradrDuration = Nothing}
gcsvradrState :: Lens' GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse (Maybe GoogleCloudSecuritycenterV1RunAssetDiscoveryResponseState)
gcsvradrState
= lens _gcsvradrState
(\ s a -> s{_gcsvradrState = a})
gcsvradrDuration :: Lens' GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse (Maybe Scientific)
gcsvradrDuration
= lens _gcsvradrDuration
(\ s a -> s{_gcsvradrDuration = a})
. mapping _GDuration
instance FromJSON
GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse
where
parseJSON
= withObject
"GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse"
(\ o ->
GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse'
<$> (o .:? "state") <*> (o .:? "duration"))
instance ToJSON
GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse
where
toJSON
GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse'{..}
= object
(catMaybes
[("state" .=) <$> _gcsvradrState,
("duration" .=) <$> _gcsvradrDuration])
data ListAssetsResponse =
ListAssetsResponse'
{ _larReadTime :: !(Maybe DateTime')
, _larNextPageToken :: !(Maybe Text)
, _larListAssetsResults :: !(Maybe [ListAssetsResult])
, _larTotalSize :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
listAssetsResponse
:: ListAssetsResponse
listAssetsResponse =
ListAssetsResponse'
{ _larReadTime = Nothing
, _larNextPageToken = Nothing
, _larListAssetsResults = Nothing
, _larTotalSize = Nothing
}
larReadTime :: Lens' ListAssetsResponse (Maybe UTCTime)
larReadTime
= lens _larReadTime (\ s a -> s{_larReadTime = a}) .
mapping _DateTime
larNextPageToken :: Lens' ListAssetsResponse (Maybe Text)
larNextPageToken
= lens _larNextPageToken
(\ s a -> s{_larNextPageToken = a})
larListAssetsResults :: Lens' ListAssetsResponse [ListAssetsResult]
larListAssetsResults
= lens _larListAssetsResults
(\ s a -> s{_larListAssetsResults = a})
. _Default
. _Coerce
larTotalSize :: Lens' ListAssetsResponse (Maybe Int32)
larTotalSize
= lens _larTotalSize (\ s a -> s{_larTotalSize = a})
. mapping _Coerce
instance FromJSON ListAssetsResponse where
parseJSON
= withObject "ListAssetsResponse"
(\ o ->
ListAssetsResponse' <$>
(o .:? "readTime") <*> (o .:? "nextPageToken") <*>
(o .:? "listAssetsResults" .!= mempty)
<*> (o .:? "totalSize"))
instance ToJSON ListAssetsResponse where
toJSON ListAssetsResponse'{..}
= object
(catMaybes
[("readTime" .=) <$> _larReadTime,
("nextPageToken" .=) <$> _larNextPageToken,
("listAssetsResults" .=) <$> _larListAssetsResults,
("totalSize" .=) <$> _larTotalSize])
newtype TestIAMPermissionsRequest =
TestIAMPermissionsRequest'
{ _tiprPermissions :: Maybe [Text]
}
deriving (Eq, Show, Data, Typeable, Generic)
testIAMPermissionsRequest
:: TestIAMPermissionsRequest
testIAMPermissionsRequest =
TestIAMPermissionsRequest' {_tiprPermissions = Nothing}
tiprPermissions :: Lens' TestIAMPermissionsRequest [Text]
tiprPermissions
= lens _tiprPermissions
(\ s a -> s{_tiprPermissions = a})
. _Default
. _Coerce
instance FromJSON TestIAMPermissionsRequest where
parseJSON
= withObject "TestIAMPermissionsRequest"
(\ o ->
TestIAMPermissionsRequest' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestIAMPermissionsRequest where
toJSON TestIAMPermissionsRequest'{..}
= object
(catMaybes [("permissions" .=) <$> _tiprPermissions])
newtype IAMPolicy =
IAMPolicy'
{ _ipPolicyBlob :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
iamPolicy
:: IAMPolicy
iamPolicy = IAMPolicy' {_ipPolicyBlob = Nothing}
ipPolicyBlob :: Lens' IAMPolicy (Maybe Text)
ipPolicyBlob
= lens _ipPolicyBlob (\ s a -> s{_ipPolicyBlob = a})
instance FromJSON IAMPolicy where
parseJSON
= withObject "IAMPolicy"
(\ o -> IAMPolicy' <$> (o .:? "policyBlob"))
instance ToJSON IAMPolicy where
toJSON IAMPolicy'{..}
= object
(catMaybes [("policyBlob" .=) <$> _ipPolicyBlob])
data Source =
Source'
{ _sName :: !(Maybe Text)
, _sDisplayName :: !(Maybe Text)
, _sDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
source
:: Source
source =
Source' {_sName = Nothing, _sDisplayName = Nothing, _sDescription = Nothing}
sName :: Lens' Source (Maybe Text)
sName = lens _sName (\ s a -> s{_sName = a})
sDisplayName :: Lens' Source (Maybe Text)
sDisplayName
= lens _sDisplayName (\ s a -> s{_sDisplayName = a})
sDescription :: Lens' Source (Maybe Text)
sDescription
= lens _sDescription (\ s a -> s{_sDescription = a})
instance FromJSON Source where
parseJSON
= withObject "Source"
(\ o ->
Source' <$>
(o .:? "name") <*> (o .:? "displayName") <*>
(o .:? "description"))
instance ToJSON Source where
toJSON Source'{..}
= object
(catMaybes
[("name" .=) <$> _sName,
("displayName" .=) <$> _sDisplayName,
("description" .=) <$> _sDescription])
newtype TestIAMPermissionsResponse =
TestIAMPermissionsResponse'
{ _tiamprPermissions :: Maybe [Text]
}
deriving (Eq, Show, Data, Typeable, Generic)
testIAMPermissionsResponse
:: TestIAMPermissionsResponse
testIAMPermissionsResponse =
TestIAMPermissionsResponse' {_tiamprPermissions = Nothing}
tiamprPermissions :: Lens' TestIAMPermissionsResponse [Text]
tiamprPermissions
= lens _tiamprPermissions
(\ s a -> s{_tiamprPermissions = a})
. _Default
. _Coerce
instance FromJSON TestIAMPermissionsResponse where
parseJSON
= withObject "TestIAMPermissionsResponse"
(\ o ->
TestIAMPermissionsResponse' <$>
(o .:? "permissions" .!= mempty))
instance ToJSON TestIAMPermissionsResponse where
toJSON TestIAMPermissionsResponse'{..}
= object
(catMaybes
[("permissions" .=) <$> _tiamprPermissions])
data ListAssetsResult =
ListAssetsResult'
{ _larAsset :: !(Maybe Asset)
, _larStateChange :: !(Maybe ListAssetsResultStateChange)
}
deriving (Eq, Show, Data, Typeable, Generic)
listAssetsResult
:: ListAssetsResult
listAssetsResult =
ListAssetsResult' {_larAsset = Nothing, _larStateChange = Nothing}
larAsset :: Lens' ListAssetsResult (Maybe Asset)
larAsset = lens _larAsset (\ s a -> s{_larAsset = a})
larStateChange :: Lens' ListAssetsResult (Maybe ListAssetsResultStateChange)
larStateChange
= lens _larStateChange
(\ s a -> s{_larStateChange = a})
instance FromJSON ListAssetsResult where
parseJSON
= withObject "ListAssetsResult"
(\ o ->
ListAssetsResult' <$>
(o .:? "asset") <*> (o .:? "stateChange"))
instance ToJSON ListAssetsResult where
toJSON ListAssetsResult'{..}
= object
(catMaybes
[("asset" .=) <$> _larAsset,
("stateChange" .=) <$> _larStateChange])
data Policy =
Policy'
{ _pAuditConfigs :: !(Maybe [AuditConfig])
, _pEtag :: !(Maybe Bytes)
, _pVersion :: !(Maybe (Textual Int32))
, _pBindings :: !(Maybe [Binding])
}
deriving (Eq, Show, Data, Typeable, Generic)
policy
:: Policy
policy =
Policy'
{ _pAuditConfigs = Nothing
, _pEtag = Nothing
, _pVersion = Nothing
, _pBindings = Nothing
}
pAuditConfigs :: Lens' Policy [AuditConfig]
pAuditConfigs
= lens _pAuditConfigs
(\ s a -> s{_pAuditConfigs = a})
. _Default
. _Coerce
pEtag :: Lens' Policy (Maybe ByteString)
pEtag
= lens _pEtag (\ s a -> s{_pEtag = a}) .
mapping _Bytes
pVersion :: Lens' Policy (Maybe Int32)
pVersion
= lens _pVersion (\ s a -> s{_pVersion = a}) .
mapping _Coerce
pBindings :: Lens' Policy [Binding]
pBindings
= lens _pBindings (\ s a -> s{_pBindings = a}) .
_Default
. _Coerce
instance FromJSON Policy where
parseJSON
= withObject "Policy"
(\ o ->
Policy' <$>
(o .:? "auditConfigs" .!= mempty) <*> (o .:? "etag")
<*> (o .:? "version")
<*> (o .:? "bindings" .!= mempty))
instance ToJSON Policy where
toJSON Policy'{..}
= object
(catMaybes
[("auditConfigs" .=) <$> _pAuditConfigs,
("etag" .=) <$> _pEtag, ("version" .=) <$> _pVersion,
("bindings" .=) <$> _pBindings])
newtype OperationMetadata =
OperationMetadata'
{ _omAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
operationMetadata
:: HashMap Text JSONValue
-> OperationMetadata
operationMetadata pOmAddtional_ =
OperationMetadata' {_omAddtional = _Coerce # pOmAddtional_}
omAddtional :: Lens' OperationMetadata (HashMap Text JSONValue)
omAddtional
= lens _omAddtional (\ s a -> s{_omAddtional = a}) .
_Coerce
instance FromJSON OperationMetadata where
parseJSON
= withObject "OperationMetadata"
(\ o -> OperationMetadata' <$> (parseJSONObject o))
instance ToJSON OperationMetadata where
toJSON = toJSON . _omAddtional
data AuditLogConfig =
AuditLogConfig'
{ _alcLogType :: !(Maybe AuditLogConfigLogType)
, _alcExemptedMembers :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
auditLogConfig
:: AuditLogConfig
auditLogConfig =
AuditLogConfig' {_alcLogType = Nothing, _alcExemptedMembers = Nothing}
alcLogType :: Lens' AuditLogConfig (Maybe AuditLogConfigLogType)
alcLogType
= lens _alcLogType (\ s a -> s{_alcLogType = a})
alcExemptedMembers :: Lens' AuditLogConfig [Text]
alcExemptedMembers
= lens _alcExemptedMembers
(\ s a -> s{_alcExemptedMembers = a})
. _Default
. _Coerce
instance FromJSON AuditLogConfig where
parseJSON
= withObject "AuditLogConfig"
(\ o ->
AuditLogConfig' <$>
(o .:? "logType") <*>
(o .:? "exemptedMembers" .!= mempty))
instance ToJSON AuditLogConfig where
toJSON AuditLogConfig'{..}
= object
(catMaybes
[("logType" .=) <$> _alcLogType,
("exemptedMembers" .=) <$> _alcExemptedMembers])
data GroupResult =
GroupResult'
{ _grCount :: !(Maybe (Textual Int64))
, _grProperties :: !(Maybe GroupResultProperties)
}
deriving (Eq, Show, Data, Typeable, Generic)
groupResult
:: GroupResult
groupResult = GroupResult' {_grCount = Nothing, _grProperties = Nothing}
grCount :: Lens' GroupResult (Maybe Int64)
grCount
= lens _grCount (\ s a -> s{_grCount = a}) .
mapping _Coerce
grProperties :: Lens' GroupResult (Maybe GroupResultProperties)
grProperties
= lens _grProperties (\ s a -> s{_grProperties = a})
instance FromJSON GroupResult where
parseJSON
= withObject "GroupResult"
(\ o ->
GroupResult' <$>
(o .:? "count") <*> (o .:? "properties"))
instance ToJSON GroupResult where
toJSON GroupResult'{..}
= object
(catMaybes
[("count" .=) <$> _grCount,
("properties" .=) <$> _grProperties])
newtype OperationResponse =
OperationResponse'
{ _orAddtional :: HashMap Text JSONValue
}
deriving (Eq, Show, Data, Typeable, Generic)
operationResponse
:: HashMap Text JSONValue
-> OperationResponse
operationResponse pOrAddtional_ =
OperationResponse' {_orAddtional = _Coerce # pOrAddtional_}
orAddtional :: Lens' OperationResponse (HashMap Text JSONValue)
orAddtional
= lens _orAddtional (\ s a -> s{_orAddtional = a}) .
_Coerce
instance FromJSON OperationResponse where
parseJSON
= withObject "OperationResponse"
(\ o -> OperationResponse' <$> (parseJSONObject o))
instance ToJSON OperationResponse where
toJSON = toJSON . _orAddtional
newtype SecurityMarksMarks =
SecurityMarksMarks'
{ _smmAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
securityMarksMarks
:: HashMap Text Text
-> SecurityMarksMarks
securityMarksMarks pSmmAddtional_ =
SecurityMarksMarks' {_smmAddtional = _Coerce # pSmmAddtional_}
smmAddtional :: Lens' SecurityMarksMarks (HashMap Text Text)
smmAddtional
= lens _smmAddtional (\ s a -> s{_smmAddtional = a})
. _Coerce
instance FromJSON SecurityMarksMarks where
parseJSON
= withObject "SecurityMarksMarks"
(\ o -> SecurityMarksMarks' <$> (parseJSONObject o))
instance ToJSON SecurityMarksMarks where
toJSON = toJSON . _smmAddtional
data GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse =
GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse'
{ _gState :: !(Maybe GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponseState)
, _gDuration :: !(Maybe GDuration)
}
deriving (Eq, Show, Data, Typeable, Generic)
googleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse
:: GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse
googleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse =
GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse'
{_gState = Nothing, _gDuration = Nothing}
gState :: Lens' GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse (Maybe GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponseState)
gState = lens _gState (\ s a -> s{_gState = a})
gDuration :: Lens' GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse (Maybe Scientific)
gDuration
= lens _gDuration (\ s a -> s{_gDuration = a}) .
mapping _GDuration
instance FromJSON
GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse
where
parseJSON
= withObject
"GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse"
(\ o ->
GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse'
<$> (o .:? "state") <*> (o .:? "duration"))
instance ToJSON
GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse
where
toJSON
GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse'{..}
= object
(catMaybes
[("state" .=) <$> _gState,
("duration" .=) <$> _gDuration])
data Binding =
Binding'
{ _bMembers :: !(Maybe [Text])
, _bRole :: !(Maybe Text)
, _bCondition :: !(Maybe Expr)
}
deriving (Eq, Show, Data, Typeable, Generic)
binding
:: Binding
binding =
Binding' {_bMembers = Nothing, _bRole = Nothing, _bCondition = Nothing}
bMembers :: Lens' Binding [Text]
bMembers
= lens _bMembers (\ s a -> s{_bMembers = a}) .
_Default
. _Coerce
bRole :: Lens' Binding (Maybe Text)
bRole = lens _bRole (\ s a -> s{_bRole = a})
bCondition :: Lens' Binding (Maybe Expr)
bCondition
= lens _bCondition (\ s a -> s{_bCondition = a})
instance FromJSON Binding where
parseJSON
= withObject "Binding"
(\ o ->
Binding' <$>
(o .:? "members" .!= mempty) <*> (o .:? "role") <*>
(o .:? "condition"))
instance ToJSON Binding where
toJSON Binding'{..}
= object
(catMaybes
[("members" .=) <$> _bMembers,
("role" .=) <$> _bRole,
("condition" .=) <$> _bCondition])