{-# 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.ContainerAnalysis.Types.Product where
import Network.Google.ContainerAnalysis.Types.Sum
import Network.Google.Prelude
data Installation =
Installation'
{ _iLocation :: !(Maybe [Location])
, _iName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
installation
:: Installation
installation = Installation' {_iLocation = Nothing, _iName = Nothing}
iLocation :: Lens' Installation [Location]
iLocation
= lens _iLocation (\ s a -> s{_iLocation = a}) .
_Default
. _Coerce
iName :: Lens' Installation (Maybe Text)
iName = lens _iName (\ s a -> s{_iName = a})
instance FromJSON Installation where
parseJSON
= withObject "Installation"
(\ o ->
Installation' <$>
(o .:? "location" .!= mempty) <*> (o .:? "name"))
instance ToJSON Installation where
toJSON Installation'{..}
= object
(catMaybes
[("location" .=) <$> _iLocation,
("name" .=) <$> _iName])
data Signature =
Signature'
{ _sSignature :: !(Maybe Bytes)
, _sPublicKeyId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
signature
:: Signature
signature = Signature' {_sSignature = Nothing, _sPublicKeyId = Nothing}
sSignature :: Lens' Signature (Maybe ByteString)
sSignature
= lens _sSignature (\ s a -> s{_sSignature = a}) .
mapping _Bytes
sPublicKeyId :: Lens' Signature (Maybe Text)
sPublicKeyId
= lens _sPublicKeyId (\ s a -> s{_sPublicKeyId = a})
instance FromJSON Signature where
parseJSON
= withObject "Signature"
(\ o ->
Signature' <$>
(o .:? "signature") <*> (o .:? "publicKeyId"))
instance ToJSON Signature where
toJSON Signature'{..}
= object
(catMaybes
[("signature" .=) <$> _sSignature,
("publicKeyId" .=) <$> _sPublicKeyId])
data Vulnerability =
Vulnerability'
{ _vCvssScore :: !(Maybe (Textual Double))
, _vCvssV3 :: !(Maybe CVSSv3)
, _vSeverity :: !(Maybe VulnerabilitySeverity)
, _vDetails :: !(Maybe [Detail])
, _vWindowsDetails :: !(Maybe [WindowsDetail])
}
deriving (Eq, Show, Data, Typeable, Generic)
vulnerability
:: Vulnerability
vulnerability =
Vulnerability'
{ _vCvssScore = Nothing
, _vCvssV3 = Nothing
, _vSeverity = Nothing
, _vDetails = Nothing
, _vWindowsDetails = Nothing
}
vCvssScore :: Lens' Vulnerability (Maybe Double)
vCvssScore
= lens _vCvssScore (\ s a -> s{_vCvssScore = a}) .
mapping _Coerce
vCvssV3 :: Lens' Vulnerability (Maybe CVSSv3)
vCvssV3 = lens _vCvssV3 (\ s a -> s{_vCvssV3 = a})
vSeverity :: Lens' Vulnerability (Maybe VulnerabilitySeverity)
vSeverity
= lens _vSeverity (\ s a -> s{_vSeverity = a})
vDetails :: Lens' Vulnerability [Detail]
vDetails
= lens _vDetails (\ s a -> s{_vDetails = a}) .
_Default
. _Coerce
vWindowsDetails :: Lens' Vulnerability [WindowsDetail]
vWindowsDetails
= lens _vWindowsDetails
(\ s a -> s{_vWindowsDetails = a})
. _Default
. _Coerce
instance FromJSON Vulnerability where
parseJSON
= withObject "Vulnerability"
(\ o ->
Vulnerability' <$>
(o .:? "cvssScore") <*> (o .:? "cvssV3") <*>
(o .:? "severity")
<*> (o .:? "details" .!= mempty)
<*> (o .:? "windowsDetails" .!= mempty))
instance ToJSON Vulnerability where
toJSON Vulnerability'{..}
= object
(catMaybes
[("cvssScore" .=) <$> _vCvssScore,
("cvssV3" .=) <$> _vCvssV3,
("severity" .=) <$> _vSeverity,
("details" .=) <$> _vDetails,
("windowsDetails" .=) <$> _vWindowsDetails])
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])
newtype VulnerabilityOccurrencesSummary =
VulnerabilityOccurrencesSummary'
{ _vosCounts :: Maybe [FixableTotalByDigest]
}
deriving (Eq, Show, Data, Typeable, Generic)
vulnerabilityOccurrencesSummary
:: VulnerabilityOccurrencesSummary
vulnerabilityOccurrencesSummary =
VulnerabilityOccurrencesSummary' {_vosCounts = Nothing}
vosCounts :: Lens' VulnerabilityOccurrencesSummary [FixableTotalByDigest]
vosCounts
= lens _vosCounts (\ s a -> s{_vosCounts = a}) .
_Default
. _Coerce
instance FromJSON VulnerabilityOccurrencesSummary
where
parseJSON
= withObject "VulnerabilityOccurrencesSummary"
(\ o ->
VulnerabilityOccurrencesSummary' <$>
(o .:? "counts" .!= mempty))
instance ToJSON VulnerabilityOccurrencesSummary where
toJSON VulnerabilityOccurrencesSummary'{..}
= object (catMaybes [("counts" .=) <$> _vosCounts])
data BuildProvenance =
BuildProvenance'
{ _bpCreator :: !(Maybe Text)
, _bpSourceProvenance :: !(Maybe Source)
, _bpCommands :: !(Maybe [Command])
, _bpTriggerId :: !(Maybe Text)
, _bpStartTime :: !(Maybe DateTime')
, _bpBuilderVersion :: !(Maybe Text)
, _bpEndTime :: !(Maybe DateTime')
, _bpId :: !(Maybe Text)
, _bpProjectId :: !(Maybe Text)
, _bpBuiltArtifacts :: !(Maybe [Artifact])
, _bpBuildOptions :: !(Maybe BuildProvenanceBuildOptions)
, _bpCreateTime :: !(Maybe DateTime')
, _bpLogsURI :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
buildProvenance
:: BuildProvenance
buildProvenance =
BuildProvenance'
{ _bpCreator = Nothing
, _bpSourceProvenance = Nothing
, _bpCommands = Nothing
, _bpTriggerId = Nothing
, _bpStartTime = Nothing
, _bpBuilderVersion = Nothing
, _bpEndTime = Nothing
, _bpId = Nothing
, _bpProjectId = Nothing
, _bpBuiltArtifacts = Nothing
, _bpBuildOptions = Nothing
, _bpCreateTime = Nothing
, _bpLogsURI = Nothing
}
bpCreator :: Lens' BuildProvenance (Maybe Text)
bpCreator
= lens _bpCreator (\ s a -> s{_bpCreator = a})
bpSourceProvenance :: Lens' BuildProvenance (Maybe Source)
bpSourceProvenance
= lens _bpSourceProvenance
(\ s a -> s{_bpSourceProvenance = a})
bpCommands :: Lens' BuildProvenance [Command]
bpCommands
= lens _bpCommands (\ s a -> s{_bpCommands = a}) .
_Default
. _Coerce
bpTriggerId :: Lens' BuildProvenance (Maybe Text)
bpTriggerId
= lens _bpTriggerId (\ s a -> s{_bpTriggerId = a})
bpStartTime :: Lens' BuildProvenance (Maybe UTCTime)
bpStartTime
= lens _bpStartTime (\ s a -> s{_bpStartTime = a}) .
mapping _DateTime
bpBuilderVersion :: Lens' BuildProvenance (Maybe Text)
bpBuilderVersion
= lens _bpBuilderVersion
(\ s a -> s{_bpBuilderVersion = a})
bpEndTime :: Lens' BuildProvenance (Maybe UTCTime)
bpEndTime
= lens _bpEndTime (\ s a -> s{_bpEndTime = a}) .
mapping _DateTime
bpId :: Lens' BuildProvenance (Maybe Text)
bpId = lens _bpId (\ s a -> s{_bpId = a})
bpProjectId :: Lens' BuildProvenance (Maybe Text)
bpProjectId
= lens _bpProjectId (\ s a -> s{_bpProjectId = a})
bpBuiltArtifacts :: Lens' BuildProvenance [Artifact]
bpBuiltArtifacts
= lens _bpBuiltArtifacts
(\ s a -> s{_bpBuiltArtifacts = a})
. _Default
. _Coerce
bpBuildOptions :: Lens' BuildProvenance (Maybe BuildProvenanceBuildOptions)
bpBuildOptions
= lens _bpBuildOptions
(\ s a -> s{_bpBuildOptions = a})
bpCreateTime :: Lens' BuildProvenance (Maybe UTCTime)
bpCreateTime
= lens _bpCreateTime (\ s a -> s{_bpCreateTime = a})
. mapping _DateTime
bpLogsURI :: Lens' BuildProvenance (Maybe Text)
bpLogsURI
= lens _bpLogsURI (\ s a -> s{_bpLogsURI = a})
instance FromJSON BuildProvenance where
parseJSON
= withObject "BuildProvenance"
(\ o ->
BuildProvenance' <$>
(o .:? "creator") <*> (o .:? "sourceProvenance") <*>
(o .:? "commands" .!= mempty)
<*> (o .:? "triggerId")
<*> (o .:? "startTime")
<*> (o .:? "builderVersion")
<*> (o .:? "endTime")
<*> (o .:? "id")
<*> (o .:? "projectId")
<*> (o .:? "builtArtifacts" .!= mempty)
<*> (o .:? "buildOptions")
<*> (o .:? "createTime")
<*> (o .:? "logsUri"))
instance ToJSON BuildProvenance where
toJSON BuildProvenance'{..}
= object
(catMaybes
[("creator" .=) <$> _bpCreator,
("sourceProvenance" .=) <$> _bpSourceProvenance,
("commands" .=) <$> _bpCommands,
("triggerId" .=) <$> _bpTriggerId,
("startTime" .=) <$> _bpStartTime,
("builderVersion" .=) <$> _bpBuilderVersion,
("endTime" .=) <$> _bpEndTime, ("id" .=) <$> _bpId,
("projectId" .=) <$> _bpProjectId,
("builtArtifacts" .=) <$> _bpBuiltArtifacts,
("buildOptions" .=) <$> _bpBuildOptions,
("createTime" .=) <$> _bpCreateTime,
("logsUri" .=) <$> _bpLogsURI])
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 Occurrence =
Occurrence'
{ _oInstallation :: !(Maybe GrafeasV1beta1PackageDetails)
, _oVulnerability :: !(Maybe GrafeasV1beta1VulnerabilityDetails)
, _oDerivedImage :: !(Maybe GrafeasV1beta1ImageDetails)
, _oKind :: !(Maybe OccurrenceKind)
, _oBuild :: !(Maybe GrafeasV1beta1BuildDetails)
, _oAttestation :: !(Maybe Details)
, _oUpdateTime :: !(Maybe DateTime')
, _oName :: !(Maybe Text)
, _oNoteName :: !(Maybe Text)
, _oRemediation :: !(Maybe Text)
, _oResource :: !(Maybe Resource)
, _oDiscovered :: !(Maybe GrafeasV1beta1DiscoveryDetails)
, _oCreateTime :: !(Maybe DateTime')
, _oDeployment :: !(Maybe GrafeasV1beta1DeploymentDetails)
}
deriving (Eq, Show, Data, Typeable, Generic)
occurrence
:: Occurrence
occurrence =
Occurrence'
{ _oInstallation = Nothing
, _oVulnerability = Nothing
, _oDerivedImage = Nothing
, _oKind = Nothing
, _oBuild = Nothing
, _oAttestation = Nothing
, _oUpdateTime = Nothing
, _oName = Nothing
, _oNoteName = Nothing
, _oRemediation = Nothing
, _oResource = Nothing
, _oDiscovered = Nothing
, _oCreateTime = Nothing
, _oDeployment = Nothing
}
oInstallation :: Lens' Occurrence (Maybe GrafeasV1beta1PackageDetails)
oInstallation
= lens _oInstallation
(\ s a -> s{_oInstallation = a})
oVulnerability :: Lens' Occurrence (Maybe GrafeasV1beta1VulnerabilityDetails)
oVulnerability
= lens _oVulnerability
(\ s a -> s{_oVulnerability = a})
oDerivedImage :: Lens' Occurrence (Maybe GrafeasV1beta1ImageDetails)
oDerivedImage
= lens _oDerivedImage
(\ s a -> s{_oDerivedImage = a})
oKind :: Lens' Occurrence (Maybe OccurrenceKind)
oKind = lens _oKind (\ s a -> s{_oKind = a})
oBuild :: Lens' Occurrence (Maybe GrafeasV1beta1BuildDetails)
oBuild = lens _oBuild (\ s a -> s{_oBuild = a})
oAttestation :: Lens' Occurrence (Maybe Details)
oAttestation
= lens _oAttestation (\ s a -> s{_oAttestation = a})
oUpdateTime :: Lens' Occurrence (Maybe UTCTime)
oUpdateTime
= lens _oUpdateTime (\ s a -> s{_oUpdateTime = a}) .
mapping _DateTime
oName :: Lens' Occurrence (Maybe Text)
oName = lens _oName (\ s a -> s{_oName = a})
oNoteName :: Lens' Occurrence (Maybe Text)
oNoteName
= lens _oNoteName (\ s a -> s{_oNoteName = a})
oRemediation :: Lens' Occurrence (Maybe Text)
oRemediation
= lens _oRemediation (\ s a -> s{_oRemediation = a})
oResource :: Lens' Occurrence (Maybe Resource)
oResource
= lens _oResource (\ s a -> s{_oResource = a})
oDiscovered :: Lens' Occurrence (Maybe GrafeasV1beta1DiscoveryDetails)
oDiscovered
= lens _oDiscovered (\ s a -> s{_oDiscovered = a})
oCreateTime :: Lens' Occurrence (Maybe UTCTime)
oCreateTime
= lens _oCreateTime (\ s a -> s{_oCreateTime = a}) .
mapping _DateTime
oDeployment :: Lens' Occurrence (Maybe GrafeasV1beta1DeploymentDetails)
oDeployment
= lens _oDeployment (\ s a -> s{_oDeployment = a})
instance FromJSON Occurrence where
parseJSON
= withObject "Occurrence"
(\ o ->
Occurrence' <$>
(o .:? "installation") <*> (o .:? "vulnerability")
<*> (o .:? "derivedImage")
<*> (o .:? "kind")
<*> (o .:? "build")
<*> (o .:? "attestation")
<*> (o .:? "updateTime")
<*> (o .:? "name")
<*> (o .:? "noteName")
<*> (o .:? "remediation")
<*> (o .:? "resource")
<*> (o .:? "discovered")
<*> (o .:? "createTime")
<*> (o .:? "deployment"))
instance ToJSON Occurrence where
toJSON Occurrence'{..}
= object
(catMaybes
[("installation" .=) <$> _oInstallation,
("vulnerability" .=) <$> _oVulnerability,
("derivedImage" .=) <$> _oDerivedImage,
("kind" .=) <$> _oKind, ("build" .=) <$> _oBuild,
("attestation" .=) <$> _oAttestation,
("updateTime" .=) <$> _oUpdateTime,
("name" .=) <$> _oName,
("noteName" .=) <$> _oNoteName,
("remediation" .=) <$> _oRemediation,
("resource" .=) <$> _oResource,
("discovered" .=) <$> _oDiscovered,
("createTime" .=) <$> _oCreateTime,
("deployment" .=) <$> _oDeployment])
data GrafeasV1beta1VulnerabilityDetails =
GrafeasV1beta1VulnerabilityDetails'
{ _gvvdLongDescription :: !(Maybe Text)
, _gvvdRelatedURLs :: !(Maybe [RelatedURL])
, _gvvdCvssScore :: !(Maybe (Textual Double))
, _gvvdPackageIssue :: !(Maybe [PackageIssue])
, _gvvdSeverity :: !(Maybe GrafeasV1beta1VulnerabilityDetailsSeverity)
, _gvvdEffectiveSeverity :: !(Maybe GrafeasV1beta1VulnerabilityDetailsEffectiveSeverity)
, _gvvdShortDescription :: !(Maybe Text)
, _gvvdType :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
grafeasV1beta1VulnerabilityDetails
:: GrafeasV1beta1VulnerabilityDetails
grafeasV1beta1VulnerabilityDetails =
GrafeasV1beta1VulnerabilityDetails'
{ _gvvdLongDescription = Nothing
, _gvvdRelatedURLs = Nothing
, _gvvdCvssScore = Nothing
, _gvvdPackageIssue = Nothing
, _gvvdSeverity = Nothing
, _gvvdEffectiveSeverity = Nothing
, _gvvdShortDescription = Nothing
, _gvvdType = Nothing
}
gvvdLongDescription :: Lens' GrafeasV1beta1VulnerabilityDetails (Maybe Text)
gvvdLongDescription
= lens _gvvdLongDescription
(\ s a -> s{_gvvdLongDescription = a})
gvvdRelatedURLs :: Lens' GrafeasV1beta1VulnerabilityDetails [RelatedURL]
gvvdRelatedURLs
= lens _gvvdRelatedURLs
(\ s a -> s{_gvvdRelatedURLs = a})
. _Default
. _Coerce
gvvdCvssScore :: Lens' GrafeasV1beta1VulnerabilityDetails (Maybe Double)
gvvdCvssScore
= lens _gvvdCvssScore
(\ s a -> s{_gvvdCvssScore = a})
. mapping _Coerce
gvvdPackageIssue :: Lens' GrafeasV1beta1VulnerabilityDetails [PackageIssue]
gvvdPackageIssue
= lens _gvvdPackageIssue
(\ s a -> s{_gvvdPackageIssue = a})
. _Default
. _Coerce
gvvdSeverity :: Lens' GrafeasV1beta1VulnerabilityDetails (Maybe GrafeasV1beta1VulnerabilityDetailsSeverity)
gvvdSeverity
= lens _gvvdSeverity (\ s a -> s{_gvvdSeverity = a})
gvvdEffectiveSeverity :: Lens' GrafeasV1beta1VulnerabilityDetails (Maybe GrafeasV1beta1VulnerabilityDetailsEffectiveSeverity)
gvvdEffectiveSeverity
= lens _gvvdEffectiveSeverity
(\ s a -> s{_gvvdEffectiveSeverity = a})
gvvdShortDescription :: Lens' GrafeasV1beta1VulnerabilityDetails (Maybe Text)
gvvdShortDescription
= lens _gvvdShortDescription
(\ s a -> s{_gvvdShortDescription = a})
gvvdType :: Lens' GrafeasV1beta1VulnerabilityDetails (Maybe Text)
gvvdType = lens _gvvdType (\ s a -> s{_gvvdType = a})
instance FromJSON GrafeasV1beta1VulnerabilityDetails
where
parseJSON
= withObject "GrafeasV1beta1VulnerabilityDetails"
(\ o ->
GrafeasV1beta1VulnerabilityDetails' <$>
(o .:? "longDescription") <*>
(o .:? "relatedUrls" .!= mempty)
<*> (o .:? "cvssScore")
<*> (o .:? "packageIssue" .!= mempty)
<*> (o .:? "severity")
<*> (o .:? "effectiveSeverity")
<*> (o .:? "shortDescription")
<*> (o .:? "type"))
instance ToJSON GrafeasV1beta1VulnerabilityDetails
where
toJSON GrafeasV1beta1VulnerabilityDetails'{..}
= object
(catMaybes
[("longDescription" .=) <$> _gvvdLongDescription,
("relatedUrls" .=) <$> _gvvdRelatedURLs,
("cvssScore" .=) <$> _gvvdCvssScore,
("packageIssue" .=) <$> _gvvdPackageIssue,
("severity" .=) <$> _gvvdSeverity,
("effectiveSeverity" .=) <$> _gvvdEffectiveSeverity,
("shortDescription" .=) <$> _gvvdShortDescription,
("type" .=) <$> _gvvdType])
newtype SourceFileHashes =
SourceFileHashes'
{ _sfhAddtional :: HashMap Text FileHashes
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceFileHashes
:: HashMap Text FileHashes
-> SourceFileHashes
sourceFileHashes pSfhAddtional_ =
SourceFileHashes' {_sfhAddtional = _Coerce # pSfhAddtional_}
sfhAddtional :: Lens' SourceFileHashes (HashMap Text FileHashes)
sfhAddtional
= lens _sfhAddtional (\ s a -> s{_sfhAddtional = a})
. _Coerce
instance FromJSON SourceFileHashes where
parseJSON
= withObject "SourceFileHashes"
(\ o -> SourceFileHashes' <$> (parseJSONObject o))
instance ToJSON SourceFileHashes where
toJSON = toJSON . _sfhAddtional
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 Command =
Command'
{ _cDir :: !(Maybe Text)
, _cArgs :: !(Maybe [Text])
, _cEnv :: !(Maybe [Text])
, _cWaitFor :: !(Maybe [Text])
, _cName :: !(Maybe Text)
, _cId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
command
:: Command
command =
Command'
{ _cDir = Nothing
, _cArgs = Nothing
, _cEnv = Nothing
, _cWaitFor = Nothing
, _cName = Nothing
, _cId = Nothing
}
cDir :: Lens' Command (Maybe Text)
cDir = lens _cDir (\ s a -> s{_cDir = a})
cArgs :: Lens' Command [Text]
cArgs
= lens _cArgs (\ s a -> s{_cArgs = a}) . _Default .
_Coerce
cEnv :: Lens' Command [Text]
cEnv
= lens _cEnv (\ s a -> s{_cEnv = a}) . _Default .
_Coerce
cWaitFor :: Lens' Command [Text]
cWaitFor
= lens _cWaitFor (\ s a -> s{_cWaitFor = a}) .
_Default
. _Coerce
cName :: Lens' Command (Maybe Text)
cName = lens _cName (\ s a -> s{_cName = a})
cId :: Lens' Command (Maybe Text)
cId = lens _cId (\ s a -> s{_cId = a})
instance FromJSON Command where
parseJSON
= withObject "Command"
(\ o ->
Command' <$>
(o .:? "dir") <*> (o .:? "args" .!= mempty) <*>
(o .:? "env" .!= mempty)
<*> (o .:? "waitFor" .!= mempty)
<*> (o .:? "name")
<*> (o .:? "id"))
instance ToJSON Command where
toJSON Command'{..}
= object
(catMaybes
[("dir" .=) <$> _cDir, ("args" .=) <$> _cArgs,
("env" .=) <$> _cEnv, ("waitFor" .=) <$> _cWaitFor,
("name" .=) <$> _cName, ("id" .=) <$> _cId])
data KnowledgeBase =
KnowledgeBase'
{ _kbURL :: !(Maybe Text)
, _kbName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
knowledgeBase
:: KnowledgeBase
knowledgeBase = KnowledgeBase' {_kbURL = Nothing, _kbName = Nothing}
kbURL :: Lens' KnowledgeBase (Maybe Text)
kbURL = lens _kbURL (\ s a -> s{_kbURL = a})
kbName :: Lens' KnowledgeBase (Maybe Text)
kbName = lens _kbName (\ s a -> s{_kbName = a})
instance FromJSON KnowledgeBase where
parseJSON
= withObject "KnowledgeBase"
(\ o ->
KnowledgeBase' <$> (o .:? "url") <*> (o .:? "name"))
instance ToJSON KnowledgeBase where
toJSON KnowledgeBase'{..}
= object
(catMaybes
[("url" .=) <$> _kbURL, ("name" .=) <$> _kbName])
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
newtype Discovery =
Discovery'
{ _dAnalysisKind :: Maybe DiscoveryAnalysisKind
}
deriving (Eq, Show, Data, Typeable, Generic)
discovery
:: Discovery
discovery = Discovery' {_dAnalysisKind = Nothing}
dAnalysisKind :: Lens' Discovery (Maybe DiscoveryAnalysisKind)
dAnalysisKind
= lens _dAnalysisKind
(\ s a -> s{_dAnalysisKind = a})
instance FromJSON Discovery where
parseJSON
= withObject "Discovery"
(\ o -> Discovery' <$> (o .:? "analysisKind"))
instance ToJSON Discovery where
toJSON Discovery'{..}
= object
(catMaybes [("analysisKind" .=) <$> _dAnalysisKind])
data Hash =
Hash'
{ _hValue :: !(Maybe Bytes)
, _hType :: !(Maybe HashType)
}
deriving (Eq, Show, Data, Typeable, Generic)
hash
:: Hash
hash = Hash' {_hValue = Nothing, _hType = Nothing}
hValue :: Lens' Hash (Maybe ByteString)
hValue
= lens _hValue (\ s a -> s{_hValue = a}) .
mapping _Bytes
hType :: Lens' Hash (Maybe HashType)
hType = lens _hType (\ s a -> s{_hType = a})
instance FromJSON Hash where
parseJSON
= withObject "Hash"
(\ o -> Hash' <$> (o .:? "value") <*> (o .:? "type"))
instance ToJSON Hash where
toJSON Hash'{..}
= object
(catMaybes
[("value" .=) <$> _hValue, ("type" .=) <$> _hType])
data Basis =
Basis'
{ _bFingerprint :: !(Maybe Fingerprint)
, _bResourceURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
basis
:: Basis
basis = Basis' {_bFingerprint = Nothing, _bResourceURL = Nothing}
bFingerprint :: Lens' Basis (Maybe Fingerprint)
bFingerprint
= lens _bFingerprint (\ s a -> s{_bFingerprint = a})
bResourceURL :: Lens' Basis (Maybe Text)
bResourceURL
= lens _bResourceURL (\ s a -> s{_bResourceURL = a})
instance FromJSON Basis where
parseJSON
= withObject "Basis"
(\ o ->
Basis' <$>
(o .:? "fingerprint") <*> (o .:? "resourceUrl"))
instance ToJSON Basis where
toJSON Basis'{..}
= object
(catMaybes
[("fingerprint" .=) <$> _bFingerprint,
("resourceUrl" .=) <$> _bResourceURL])
newtype BatchCreateNotesRequest =
BatchCreateNotesRequest'
{ _bcnrNotes :: Maybe BatchCreateNotesRequestNotes
}
deriving (Eq, Show, Data, Typeable, Generic)
batchCreateNotesRequest
:: BatchCreateNotesRequest
batchCreateNotesRequest = BatchCreateNotesRequest' {_bcnrNotes = Nothing}
bcnrNotes :: Lens' BatchCreateNotesRequest (Maybe BatchCreateNotesRequestNotes)
bcnrNotes
= lens _bcnrNotes (\ s a -> s{_bcnrNotes = a})
instance FromJSON BatchCreateNotesRequest where
parseJSON
= withObject "BatchCreateNotesRequest"
(\ o -> BatchCreateNotesRequest' <$> (o .:? "notes"))
instance ToJSON BatchCreateNotesRequest where
toJSON BatchCreateNotesRequest'{..}
= object (catMaybes [("notes" .=) <$> _bcnrNotes])
data SourceContext =
SourceContext'
{ _scCloudRepo :: !(Maybe CloudRepoSourceContext)
, _scGerrit :: !(Maybe GerritSourceContext)
, _scGit :: !(Maybe GitSourceContext)
, _scLabels :: !(Maybe SourceContextLabels)
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceContext
:: SourceContext
sourceContext =
SourceContext'
{ _scCloudRepo = Nothing
, _scGerrit = Nothing
, _scGit = Nothing
, _scLabels = Nothing
}
scCloudRepo :: Lens' SourceContext (Maybe CloudRepoSourceContext)
scCloudRepo
= lens _scCloudRepo (\ s a -> s{_scCloudRepo = a})
scGerrit :: Lens' SourceContext (Maybe GerritSourceContext)
scGerrit = lens _scGerrit (\ s a -> s{_scGerrit = a})
scGit :: Lens' SourceContext (Maybe GitSourceContext)
scGit = lens _scGit (\ s a -> s{_scGit = a})
scLabels :: Lens' SourceContext (Maybe SourceContextLabels)
scLabels = lens _scLabels (\ s a -> s{_scLabels = a})
instance FromJSON SourceContext where
parseJSON
= withObject "SourceContext"
(\ o ->
SourceContext' <$>
(o .:? "cloudRepo") <*> (o .:? "gerrit") <*>
(o .:? "git")
<*> (o .:? "labels"))
instance ToJSON SourceContext where
toJSON SourceContext'{..}
= object
(catMaybes
[("cloudRepo" .=) <$> _scCloudRepo,
("gerrit" .=) <$> _scGerrit, ("git" .=) <$> _scGit,
("labels" .=) <$> _scLabels])
data Distribution =
Distribution'
{ _dURL :: !(Maybe Text)
, _dMaintainer :: !(Maybe Text)
, _dArchitecture :: !(Maybe DistributionArchitecture)
, _dCpeURI :: !(Maybe Text)
, _dDescription :: !(Maybe Text)
, _dLatestVersion :: !(Maybe Version)
}
deriving (Eq, Show, Data, Typeable, Generic)
distribution
:: Distribution
distribution =
Distribution'
{ _dURL = Nothing
, _dMaintainer = Nothing
, _dArchitecture = Nothing
, _dCpeURI = Nothing
, _dDescription = Nothing
, _dLatestVersion = Nothing
}
dURL :: Lens' Distribution (Maybe Text)
dURL = lens _dURL (\ s a -> s{_dURL = a})
dMaintainer :: Lens' Distribution (Maybe Text)
dMaintainer
= lens _dMaintainer (\ s a -> s{_dMaintainer = a})
dArchitecture :: Lens' Distribution (Maybe DistributionArchitecture)
dArchitecture
= lens _dArchitecture
(\ s a -> s{_dArchitecture = a})
dCpeURI :: Lens' Distribution (Maybe Text)
dCpeURI = lens _dCpeURI (\ s a -> s{_dCpeURI = a})
dDescription :: Lens' Distribution (Maybe Text)
dDescription
= lens _dDescription (\ s a -> s{_dDescription = a})
dLatestVersion :: Lens' Distribution (Maybe Version)
dLatestVersion
= lens _dLatestVersion
(\ s a -> s{_dLatestVersion = a})
instance FromJSON Distribution where
parseJSON
= withObject "Distribution"
(\ o ->
Distribution' <$>
(o .:? "url") <*> (o .:? "maintainer") <*>
(o .:? "architecture")
<*> (o .:? "cpeUri")
<*> (o .:? "description")
<*> (o .:? "latestVersion"))
instance ToJSON Distribution where
toJSON Distribution'{..}
= object
(catMaybes
[("url" .=) <$> _dURL,
("maintainer" .=) <$> _dMaintainer,
("architecture" .=) <$> _dArchitecture,
("cpeUri" .=) <$> _dCpeURI,
("description" .=) <$> _dDescription,
("latestVersion" .=) <$> _dLatestVersion])
newtype BatchCreateOccurrencesRequest =
BatchCreateOccurrencesRequest'
{ _bcorOccurrences :: Maybe [Occurrence]
}
deriving (Eq, Show, Data, Typeable, Generic)
batchCreateOccurrencesRequest
:: BatchCreateOccurrencesRequest
batchCreateOccurrencesRequest =
BatchCreateOccurrencesRequest' {_bcorOccurrences = Nothing}
bcorOccurrences :: Lens' BatchCreateOccurrencesRequest [Occurrence]
bcorOccurrences
= lens _bcorOccurrences
(\ s a -> s{_bcorOccurrences = a})
. _Default
. _Coerce
instance FromJSON BatchCreateOccurrencesRequest where
parseJSON
= withObject "BatchCreateOccurrencesRequest"
(\ o ->
BatchCreateOccurrencesRequest' <$>
(o .:? "occurrences" .!= mempty))
instance ToJSON BatchCreateOccurrencesRequest where
toJSON BatchCreateOccurrencesRequest'{..}
= object
(catMaybes [("occurrences" .=) <$> _bcorOccurrences])
data ListOccurrencesResponse =
ListOccurrencesResponse'
{ _lorOccurrences :: !(Maybe [Occurrence])
, _lorNextPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
listOccurrencesResponse
:: ListOccurrencesResponse
listOccurrencesResponse =
ListOccurrencesResponse'
{_lorOccurrences = Nothing, _lorNextPageToken = Nothing}
lorOccurrences :: Lens' ListOccurrencesResponse [Occurrence]
lorOccurrences
= lens _lorOccurrences
(\ s a -> s{_lorOccurrences = a})
. _Default
. _Coerce
lorNextPageToken :: Lens' ListOccurrencesResponse (Maybe Text)
lorNextPageToken
= lens _lorNextPageToken
(\ s a -> s{_lorNextPageToken = a})
instance FromJSON ListOccurrencesResponse where
parseJSON
= withObject "ListOccurrencesResponse"
(\ o ->
ListOccurrencesResponse' <$>
(o .:? "occurrences" .!= mempty) <*>
(o .:? "nextPageToken"))
instance ToJSON ListOccurrencesResponse where
toJSON ListOccurrencesResponse'{..}
= object
(catMaybes
[("occurrences" .=) <$> _lorOccurrences,
("nextPageToken" .=) <$> _lorNextPageToken])
data Location =
Location'
{ _lPath :: !(Maybe Text)
, _lVersion :: !(Maybe Version)
, _lCpeURI :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
location
:: Location
location = Location' {_lPath = Nothing, _lVersion = Nothing, _lCpeURI = Nothing}
lPath :: Lens' Location (Maybe Text)
lPath = lens _lPath (\ s a -> s{_lPath = a})
lVersion :: Lens' Location (Maybe Version)
lVersion = lens _lVersion (\ s a -> s{_lVersion = a})
lCpeURI :: Lens' Location (Maybe Text)
lCpeURI = lens _lCpeURI (\ s a -> s{_lCpeURI = a})
instance FromJSON Location where
parseJSON
= withObject "Location"
(\ o ->
Location' <$>
(o .:? "path") <*> (o .:? "version") <*>
(o .:? "cpeUri"))
instance ToJSON Location where
toJSON Location'{..}
= object
(catMaybes
[("path" .=) <$> _lPath,
("version" .=) <$> _lVersion,
("cpeUri" .=) <$> _lCpeURI])
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 GerritSourceContext =
GerritSourceContext'
{ _gscGerritProject :: !(Maybe Text)
, _gscRevisionId :: !(Maybe Text)
, _gscHostURI :: !(Maybe Text)
, _gscAliasContext :: !(Maybe AliasContext)
}
deriving (Eq, Show, Data, Typeable, Generic)
gerritSourceContext
:: GerritSourceContext
gerritSourceContext =
GerritSourceContext'
{ _gscGerritProject = Nothing
, _gscRevisionId = Nothing
, _gscHostURI = Nothing
, _gscAliasContext = Nothing
}
gscGerritProject :: Lens' GerritSourceContext (Maybe Text)
gscGerritProject
= lens _gscGerritProject
(\ s a -> s{_gscGerritProject = a})
gscRevisionId :: Lens' GerritSourceContext (Maybe Text)
gscRevisionId
= lens _gscRevisionId
(\ s a -> s{_gscRevisionId = a})
gscHostURI :: Lens' GerritSourceContext (Maybe Text)
gscHostURI
= lens _gscHostURI (\ s a -> s{_gscHostURI = a})
gscAliasContext :: Lens' GerritSourceContext (Maybe AliasContext)
gscAliasContext
= lens _gscAliasContext
(\ s a -> s{_gscAliasContext = a})
instance FromJSON GerritSourceContext where
parseJSON
= withObject "GerritSourceContext"
(\ o ->
GerritSourceContext' <$>
(o .:? "gerritProject") <*> (o .:? "revisionId") <*>
(o .:? "hostUri")
<*> (o .:? "aliasContext"))
instance ToJSON GerritSourceContext where
toJSON GerritSourceContext'{..}
= object
(catMaybes
[("gerritProject" .=) <$> _gscGerritProject,
("revisionId" .=) <$> _gscRevisionId,
("hostUri" .=) <$> _gscHostURI,
("aliasContext" .=) <$> _gscAliasContext])
data RepoId =
RepoId'
{ _riUid :: !(Maybe Text)
, _riProjectRepoId :: !(Maybe ProjectRepoId)
}
deriving (Eq, Show, Data, Typeable, Generic)
repoId
:: RepoId
repoId = RepoId' {_riUid = Nothing, _riProjectRepoId = Nothing}
riUid :: Lens' RepoId (Maybe Text)
riUid = lens _riUid (\ s a -> s{_riUid = a})
riProjectRepoId :: Lens' RepoId (Maybe ProjectRepoId)
riProjectRepoId
= lens _riProjectRepoId
(\ s a -> s{_riProjectRepoId = a})
instance FromJSON RepoId where
parseJSON
= withObject "RepoId"
(\ o ->
RepoId' <$>
(o .:? "uid") <*> (o .:? "projectRepoId"))
instance ToJSON RepoId where
toJSON RepoId'{..}
= object
(catMaybes
[("uid" .=) <$> _riUid,
("projectRepoId" .=) <$> _riProjectRepoId])
data ListNoteOccurrencesResponse =
ListNoteOccurrencesResponse'
{ _lnorOccurrences :: !(Maybe [Occurrence])
, _lnorNextPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
listNoteOccurrencesResponse
:: ListNoteOccurrencesResponse
listNoteOccurrencesResponse =
ListNoteOccurrencesResponse'
{_lnorOccurrences = Nothing, _lnorNextPageToken = Nothing}
lnorOccurrences :: Lens' ListNoteOccurrencesResponse [Occurrence]
lnorOccurrences
= lens _lnorOccurrences
(\ s a -> s{_lnorOccurrences = a})
. _Default
. _Coerce
lnorNextPageToken :: Lens' ListNoteOccurrencesResponse (Maybe Text)
lnorNextPageToken
= lens _lnorNextPageToken
(\ s a -> s{_lnorNextPageToken = a})
instance FromJSON ListNoteOccurrencesResponse where
parseJSON
= withObject "ListNoteOccurrencesResponse"
(\ o ->
ListNoteOccurrencesResponse' <$>
(o .:? "occurrences" .!= mempty) <*>
(o .:? "nextPageToken"))
instance ToJSON ListNoteOccurrencesResponse where
toJSON ListNoteOccurrencesResponse'{..}
= object
(catMaybes
[("occurrences" .=) <$> _lnorOccurrences,
("nextPageToken" .=) <$> _lnorNextPageToken])
data Note =
Note'
{ _nVulnerability :: !(Maybe Vulnerability)
, _nLongDescription :: !(Maybe Text)
, _nAttestationAuthority :: !(Maybe Authority)
, _nDiscovery :: !(Maybe Discovery)
, _nKind :: !(Maybe NoteKind)
, _nRelatedNoteNames :: !(Maybe [Text])
, _nBuild :: !(Maybe Build)
, _nDeployable :: !(Maybe Deployable)
, _nRelatedURL :: !(Maybe [RelatedURL])
, _nUpdateTime :: !(Maybe DateTime')
, _nShortDescription :: !(Maybe Text)
, _nName :: !(Maybe Text)
, _nBaseImage :: !(Maybe Basis)
, _nPackage :: !(Maybe Package)
, _nExpirationTime :: !(Maybe DateTime')
, _nCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
note
:: Note
note =
Note'
{ _nVulnerability = Nothing
, _nLongDescription = Nothing
, _nAttestationAuthority = Nothing
, _nDiscovery = Nothing
, _nKind = Nothing
, _nRelatedNoteNames = Nothing
, _nBuild = Nothing
, _nDeployable = Nothing
, _nRelatedURL = Nothing
, _nUpdateTime = Nothing
, _nShortDescription = Nothing
, _nName = Nothing
, _nBaseImage = Nothing
, _nPackage = Nothing
, _nExpirationTime = Nothing
, _nCreateTime = Nothing
}
nVulnerability :: Lens' Note (Maybe Vulnerability)
nVulnerability
= lens _nVulnerability
(\ s a -> s{_nVulnerability = a})
nLongDescription :: Lens' Note (Maybe Text)
nLongDescription
= lens _nLongDescription
(\ s a -> s{_nLongDescription = a})
nAttestationAuthority :: Lens' Note (Maybe Authority)
nAttestationAuthority
= lens _nAttestationAuthority
(\ s a -> s{_nAttestationAuthority = a})
nDiscovery :: Lens' Note (Maybe Discovery)
nDiscovery
= lens _nDiscovery (\ s a -> s{_nDiscovery = a})
nKind :: Lens' Note (Maybe NoteKind)
nKind = lens _nKind (\ s a -> s{_nKind = a})
nRelatedNoteNames :: Lens' Note [Text]
nRelatedNoteNames
= lens _nRelatedNoteNames
(\ s a -> s{_nRelatedNoteNames = a})
. _Default
. _Coerce
nBuild :: Lens' Note (Maybe Build)
nBuild = lens _nBuild (\ s a -> s{_nBuild = a})
nDeployable :: Lens' Note (Maybe Deployable)
nDeployable
= lens _nDeployable (\ s a -> s{_nDeployable = a})
nRelatedURL :: Lens' Note [RelatedURL]
nRelatedURL
= lens _nRelatedURL (\ s a -> s{_nRelatedURL = a}) .
_Default
. _Coerce
nUpdateTime :: Lens' Note (Maybe UTCTime)
nUpdateTime
= lens _nUpdateTime (\ s a -> s{_nUpdateTime = a}) .
mapping _DateTime
nShortDescription :: Lens' Note (Maybe Text)
nShortDescription
= lens _nShortDescription
(\ s a -> s{_nShortDescription = a})
nName :: Lens' Note (Maybe Text)
nName = lens _nName (\ s a -> s{_nName = a})
nBaseImage :: Lens' Note (Maybe Basis)
nBaseImage
= lens _nBaseImage (\ s a -> s{_nBaseImage = a})
nPackage :: Lens' Note (Maybe Package)
nPackage = lens _nPackage (\ s a -> s{_nPackage = a})
nExpirationTime :: Lens' Note (Maybe UTCTime)
nExpirationTime
= lens _nExpirationTime
(\ s a -> s{_nExpirationTime = a})
. mapping _DateTime
nCreateTime :: Lens' Note (Maybe UTCTime)
nCreateTime
= lens _nCreateTime (\ s a -> s{_nCreateTime = a}) .
mapping _DateTime
instance FromJSON Note where
parseJSON
= withObject "Note"
(\ o ->
Note' <$>
(o .:? "vulnerability") <*> (o .:? "longDescription")
<*> (o .:? "attestationAuthority")
<*> (o .:? "discovery")
<*> (o .:? "kind")
<*> (o .:? "relatedNoteNames" .!= mempty)
<*> (o .:? "build")
<*> (o .:? "deployable")
<*> (o .:? "relatedUrl" .!= mempty)
<*> (o .:? "updateTime")
<*> (o .:? "shortDescription")
<*> (o .:? "name")
<*> (o .:? "baseImage")
<*> (o .:? "package")
<*> (o .:? "expirationTime")
<*> (o .:? "createTime"))
instance ToJSON Note where
toJSON Note'{..}
= object
(catMaybes
[("vulnerability" .=) <$> _nVulnerability,
("longDescription" .=) <$> _nLongDescription,
("attestationAuthority" .=) <$>
_nAttestationAuthority,
("discovery" .=) <$> _nDiscovery,
("kind" .=) <$> _nKind,
("relatedNoteNames" .=) <$> _nRelatedNoteNames,
("build" .=) <$> _nBuild,
("deployable" .=) <$> _nDeployable,
("relatedUrl" .=) <$> _nRelatedURL,
("updateTime" .=) <$> _nUpdateTime,
("shortDescription" .=) <$> _nShortDescription,
("name" .=) <$> _nName,
("baseImage" .=) <$> _nBaseImage,
("package" .=) <$> _nPackage,
("expirationTime" .=) <$> _nExpirationTime,
("createTime" .=) <$> _nCreateTime])
data CVSSv3 =
CVSSv3'
{ _cvssAttackComplexity :: !(Maybe CVSSv3AttackComplexity)
, _cvssIntegrityImpact :: !(Maybe CVSSv3IntegrityImpact)
, _cvssPrivilegesRequired :: !(Maybe CVSSv3PrivilegesRequired)
, _cvssUserInteraction :: !(Maybe CVSSv3UserInteraction)
, _cvssAttackVector :: !(Maybe CVSSv3AttackVector)
, _cvssConfidentialityImpact :: !(Maybe CVSSv3ConfidentialityImpact)
, _cvssScope :: !(Maybe CVSSv3Scope)
, _cvssImpactScore :: !(Maybe (Textual Double))
, _cvssBaseScore :: !(Maybe (Textual Double))
, _cvssAvailabilityImpact :: !(Maybe CVSSv3AvailabilityImpact)
, _cvssExploitabilityScore :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
cVSSv3
:: CVSSv3
cVSSv3 =
CVSSv3'
{ _cvssAttackComplexity = Nothing
, _cvssIntegrityImpact = Nothing
, _cvssPrivilegesRequired = Nothing
, _cvssUserInteraction = Nothing
, _cvssAttackVector = Nothing
, _cvssConfidentialityImpact = Nothing
, _cvssScope = Nothing
, _cvssImpactScore = Nothing
, _cvssBaseScore = Nothing
, _cvssAvailabilityImpact = Nothing
, _cvssExploitabilityScore = Nothing
}
cvssAttackComplexity :: Lens' CVSSv3 (Maybe CVSSv3AttackComplexity)
cvssAttackComplexity
= lens _cvssAttackComplexity
(\ s a -> s{_cvssAttackComplexity = a})
cvssIntegrityImpact :: Lens' CVSSv3 (Maybe CVSSv3IntegrityImpact)
cvssIntegrityImpact
= lens _cvssIntegrityImpact
(\ s a -> s{_cvssIntegrityImpact = a})
cvssPrivilegesRequired :: Lens' CVSSv3 (Maybe CVSSv3PrivilegesRequired)
cvssPrivilegesRequired
= lens _cvssPrivilegesRequired
(\ s a -> s{_cvssPrivilegesRequired = a})
cvssUserInteraction :: Lens' CVSSv3 (Maybe CVSSv3UserInteraction)
cvssUserInteraction
= lens _cvssUserInteraction
(\ s a -> s{_cvssUserInteraction = a})
cvssAttackVector :: Lens' CVSSv3 (Maybe CVSSv3AttackVector)
cvssAttackVector
= lens _cvssAttackVector
(\ s a -> s{_cvssAttackVector = a})
cvssConfidentialityImpact :: Lens' CVSSv3 (Maybe CVSSv3ConfidentialityImpact)
cvssConfidentialityImpact
= lens _cvssConfidentialityImpact
(\ s a -> s{_cvssConfidentialityImpact = a})
cvssScope :: Lens' CVSSv3 (Maybe CVSSv3Scope)
cvssScope
= lens _cvssScope (\ s a -> s{_cvssScope = a})
cvssImpactScore :: Lens' CVSSv3 (Maybe Double)
cvssImpactScore
= lens _cvssImpactScore
(\ s a -> s{_cvssImpactScore = a})
. mapping _Coerce
cvssBaseScore :: Lens' CVSSv3 (Maybe Double)
cvssBaseScore
= lens _cvssBaseScore
(\ s a -> s{_cvssBaseScore = a})
. mapping _Coerce
cvssAvailabilityImpact :: Lens' CVSSv3 (Maybe CVSSv3AvailabilityImpact)
cvssAvailabilityImpact
= lens _cvssAvailabilityImpact
(\ s a -> s{_cvssAvailabilityImpact = a})
cvssExploitabilityScore :: Lens' CVSSv3 (Maybe Double)
cvssExploitabilityScore
= lens _cvssExploitabilityScore
(\ s a -> s{_cvssExploitabilityScore = a})
. mapping _Coerce
instance FromJSON CVSSv3 where
parseJSON
= withObject "CVSSv3"
(\ o ->
CVSSv3' <$>
(o .:? "attackComplexity") <*>
(o .:? "integrityImpact")
<*> (o .:? "privilegesRequired")
<*> (o .:? "userInteraction")
<*> (o .:? "attackVector")
<*> (o .:? "confidentialityImpact")
<*> (o .:? "scope")
<*> (o .:? "impactScore")
<*> (o .:? "baseScore")
<*> (o .:? "availabilityImpact")
<*> (o .:? "exploitabilityScore"))
instance ToJSON CVSSv3 where
toJSON CVSSv3'{..}
= object
(catMaybes
[("attackComplexity" .=) <$> _cvssAttackComplexity,
("integrityImpact" .=) <$> _cvssIntegrityImpact,
("privilegesRequired" .=) <$>
_cvssPrivilegesRequired,
("userInteraction" .=) <$> _cvssUserInteraction,
("attackVector" .=) <$> _cvssAttackVector,
("confidentialityImpact" .=) <$>
_cvssConfidentialityImpact,
("scope" .=) <$> _cvssScope,
("impactScore" .=) <$> _cvssImpactScore,
("baseScore" .=) <$> _cvssBaseScore,
("availabilityImpact" .=) <$>
_cvssAvailabilityImpact,
("exploitabilityScore" .=) <$>
_cvssExploitabilityScore])
newtype BatchCreateNotesResponse =
BatchCreateNotesResponse'
{ _bNotes :: Maybe [Note]
}
deriving (Eq, Show, Data, Typeable, Generic)
batchCreateNotesResponse
:: BatchCreateNotesResponse
batchCreateNotesResponse = BatchCreateNotesResponse' {_bNotes = Nothing}
bNotes :: Lens' BatchCreateNotesResponse [Note]
bNotes
= lens _bNotes (\ s a -> s{_bNotes = a}) . _Default .
_Coerce
instance FromJSON BatchCreateNotesResponse where
parseJSON
= withObject "BatchCreateNotesResponse"
(\ o ->
BatchCreateNotesResponse' <$>
(o .:? "notes" .!= mempty))
instance ToJSON BatchCreateNotesResponse where
toJSON BatchCreateNotesResponse'{..}
= object (catMaybes [("notes" .=) <$> _bNotes])
data ProjectRepoId =
ProjectRepoId'
{ _priRepoName :: !(Maybe Text)
, _priProjectId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
projectRepoId
:: ProjectRepoId
projectRepoId = ProjectRepoId' {_priRepoName = Nothing, _priProjectId = Nothing}
priRepoName :: Lens' ProjectRepoId (Maybe Text)
priRepoName
= lens _priRepoName (\ s a -> s{_priRepoName = a})
priProjectId :: Lens' ProjectRepoId (Maybe Text)
priProjectId
= lens _priProjectId (\ s a -> s{_priProjectId = a})
instance FromJSON ProjectRepoId where
parseJSON
= withObject "ProjectRepoId"
(\ o ->
ProjectRepoId' <$>
(o .:? "repoName") <*> (o .:? "projectId"))
instance ToJSON ProjectRepoId where
toJSON ProjectRepoId'{..}
= object
(catMaybes
[("repoName" .=) <$> _priRepoName,
("projectId" .=) <$> _priProjectId])
data Fingerprint =
Fingerprint'
{ _fV2Name :: !(Maybe Text)
, _fV2Blob :: !(Maybe [Text])
, _fV1Name :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
fingerprint
:: Fingerprint
fingerprint =
Fingerprint' {_fV2Name = Nothing, _fV2Blob = Nothing, _fV1Name = Nothing}
fV2Name :: Lens' Fingerprint (Maybe Text)
fV2Name = lens _fV2Name (\ s a -> s{_fV2Name = a})
fV2Blob :: Lens' Fingerprint [Text]
fV2Blob
= lens _fV2Blob (\ s a -> s{_fV2Blob = a}) . _Default
. _Coerce
fV1Name :: Lens' Fingerprint (Maybe Text)
fV1Name = lens _fV1Name (\ s a -> s{_fV1Name = a})
instance FromJSON Fingerprint where
parseJSON
= withObject "Fingerprint"
(\ o ->
Fingerprint' <$>
(o .:? "v2Name") <*> (o .:? "v2Blob" .!= mempty) <*>
(o .:? "v1Name"))
instance ToJSON Fingerprint where
toJSON Fingerprint'{..}
= object
(catMaybes
[("v2Name" .=) <$> _fV2Name,
("v2Blob" .=) <$> _fV2Blob,
("v1Name" .=) <$> _fV1Name])
newtype Hint =
Hint'
{ _hHumanReadableName :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
hint
:: Hint
hint = Hint' {_hHumanReadableName = Nothing}
hHumanReadableName :: Lens' Hint (Maybe Text)
hHumanReadableName
= lens _hHumanReadableName
(\ s a -> s{_hHumanReadableName = a})
instance FromJSON Hint where
parseJSON
= withObject "Hint"
(\ o -> Hint' <$> (o .:? "humanReadableName"))
instance ToJSON Hint where
toJSON Hint'{..}
= object
(catMaybes
[("humanReadableName" .=) <$> _hHumanReadableName])
data PackageIssue =
PackageIssue'
{ _piAffectedLocation :: !(Maybe VulnerabilityLocation)
, _piFixedLocation :: !(Maybe VulnerabilityLocation)
, _piSeverityName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
packageIssue
:: PackageIssue
packageIssue =
PackageIssue'
{ _piAffectedLocation = Nothing
, _piFixedLocation = Nothing
, _piSeverityName = Nothing
}
piAffectedLocation :: Lens' PackageIssue (Maybe VulnerabilityLocation)
piAffectedLocation
= lens _piAffectedLocation
(\ s a -> s{_piAffectedLocation = a})
piFixedLocation :: Lens' PackageIssue (Maybe VulnerabilityLocation)
piFixedLocation
= lens _piFixedLocation
(\ s a -> s{_piFixedLocation = a})
piSeverityName :: Lens' PackageIssue (Maybe Text)
piSeverityName
= lens _piSeverityName
(\ s a -> s{_piSeverityName = a})
instance FromJSON PackageIssue where
parseJSON
= withObject "PackageIssue"
(\ o ->
PackageIssue' <$>
(o .:? "affectedLocation") <*>
(o .:? "fixedLocation")
<*> (o .:? "severityName"))
instance ToJSON PackageIssue where
toJSON PackageIssue'{..}
= object
(catMaybes
[("affectedLocation" .=) <$> _piAffectedLocation,
("fixedLocation" .=) <$> _piFixedLocation,
("severityName" .=) <$> _piSeverityName])
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 Build =
Build'
{ _bSignature :: !(Maybe BuildSignature)
, _bBuilderVersion :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
build
:: Build
build = Build' {_bSignature = Nothing, _bBuilderVersion = Nothing}
bSignature :: Lens' Build (Maybe BuildSignature)
bSignature
= lens _bSignature (\ s a -> s{_bSignature = a})
bBuilderVersion :: Lens' Build (Maybe Text)
bBuilderVersion
= lens _bBuilderVersion
(\ s a -> s{_bBuilderVersion = a})
instance FromJSON Build where
parseJSON
= withObject "Build"
(\ o ->
Build' <$>
(o .:? "signature") <*> (o .:? "builderVersion"))
instance ToJSON Build where
toJSON Build'{..}
= object
(catMaybes
[("signature" .=) <$> _bSignature,
("builderVersion" .=) <$> _bBuilderVersion])
data Attestation =
Attestation'
{ _aGenericSignedAttestation :: !(Maybe GenericSignedAttestation)
, _aPgpSignedAttestation :: !(Maybe PgpSignedAttestation)
}
deriving (Eq, Show, Data, Typeable, Generic)
attestation
:: Attestation
attestation =
Attestation'
{_aGenericSignedAttestation = Nothing, _aPgpSignedAttestation = Nothing}
aGenericSignedAttestation :: Lens' Attestation (Maybe GenericSignedAttestation)
aGenericSignedAttestation
= lens _aGenericSignedAttestation
(\ s a -> s{_aGenericSignedAttestation = a})
aPgpSignedAttestation :: Lens' Attestation (Maybe PgpSignedAttestation)
aPgpSignedAttestation
= lens _aPgpSignedAttestation
(\ s a -> s{_aPgpSignedAttestation = a})
instance FromJSON Attestation where
parseJSON
= withObject "Attestation"
(\ o ->
Attestation' <$>
(o .:? "genericSignedAttestation") <*>
(o .:? "pgpSignedAttestation"))
instance ToJSON Attestation where
toJSON Attestation'{..}
= object
(catMaybes
[("genericSignedAttestation" .=) <$>
_aGenericSignedAttestation,
("pgpSignedAttestation" .=) <$>
_aPgpSignedAttestation])
data Artifact =
Artifact'
{ _aChecksum :: !(Maybe Text)
, _aNames :: !(Maybe [Text])
, _aId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
artifact
:: Artifact
artifact = Artifact' {_aChecksum = Nothing, _aNames = Nothing, _aId = Nothing}
aChecksum :: Lens' Artifact (Maybe Text)
aChecksum
= lens _aChecksum (\ s a -> s{_aChecksum = a})
aNames :: Lens' Artifact [Text]
aNames
= lens _aNames (\ s a -> s{_aNames = a}) . _Default .
_Coerce
aId :: Lens' Artifact (Maybe Text)
aId = lens _aId (\ s a -> s{_aId = a})
instance FromJSON Artifact where
parseJSON
= withObject "Artifact"
(\ o ->
Artifact' <$>
(o .:? "checksum") <*> (o .:? "names" .!= mempty) <*>
(o .:? "id"))
instance ToJSON Artifact where
toJSON Artifact'{..}
= object
(catMaybes
[("checksum" .=) <$> _aChecksum,
("names" .=) <$> _aNames, ("id" .=) <$> _aId])
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 BuildProvenanceBuildOptions =
BuildProvenanceBuildOptions'
{ _bpboAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
buildProvenanceBuildOptions
:: HashMap Text Text
-> BuildProvenanceBuildOptions
buildProvenanceBuildOptions pBpboAddtional_ =
BuildProvenanceBuildOptions' {_bpboAddtional = _Coerce # pBpboAddtional_}
bpboAddtional :: Lens' BuildProvenanceBuildOptions (HashMap Text Text)
bpboAddtional
= lens _bpboAddtional
(\ s a -> s{_bpboAddtional = a})
. _Coerce
instance FromJSON BuildProvenanceBuildOptions where
parseJSON
= withObject "BuildProvenanceBuildOptions"
(\ o ->
BuildProvenanceBuildOptions' <$> (parseJSONObject o))
instance ToJSON BuildProvenanceBuildOptions where
toJSON = toJSON . _bpboAddtional
newtype Deployable =
Deployable'
{ _dResourceURI :: Maybe [Text]
}
deriving (Eq, Show, Data, Typeable, Generic)
deployable
:: Deployable
deployable = Deployable' {_dResourceURI = Nothing}
dResourceURI :: Lens' Deployable [Text]
dResourceURI
= lens _dResourceURI (\ s a -> s{_dResourceURI = a})
. _Default
. _Coerce
instance FromJSON Deployable where
parseJSON
= withObject "Deployable"
(\ o ->
Deployable' <$> (o .:? "resourceUri" .!= mempty))
instance ToJSON Deployable where
toJSON Deployable'{..}
= object
(catMaybes [("resourceUri" .=) <$> _dResourceURI])
newtype GrafeasV1beta1DiscoveryDetails =
GrafeasV1beta1DiscoveryDetails'
{ _gvddDiscovered :: Maybe Discovered
}
deriving (Eq, Show, Data, Typeable, Generic)
grafeasV1beta1DiscoveryDetails
:: GrafeasV1beta1DiscoveryDetails
grafeasV1beta1DiscoveryDetails =
GrafeasV1beta1DiscoveryDetails' {_gvddDiscovered = Nothing}
gvddDiscovered :: Lens' GrafeasV1beta1DiscoveryDetails (Maybe Discovered)
gvddDiscovered
= lens _gvddDiscovered
(\ s a -> s{_gvddDiscovered = a})
instance FromJSON GrafeasV1beta1DiscoveryDetails
where
parseJSON
= withObject "GrafeasV1beta1DiscoveryDetails"
(\ o ->
GrafeasV1beta1DiscoveryDetails' <$>
(o .:? "discovered"))
instance ToJSON GrafeasV1beta1DiscoveryDetails where
toJSON GrafeasV1beta1DiscoveryDetails'{..}
= object
(catMaybes [("discovered" .=) <$> _gvddDiscovered])
data VulnerabilityLocation =
VulnerabilityLocation'
{ _vlVersion :: !(Maybe Version)
, _vlPackage :: !(Maybe Text)
, _vlCpeURI :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
vulnerabilityLocation
:: VulnerabilityLocation
vulnerabilityLocation =
VulnerabilityLocation'
{_vlVersion = Nothing, _vlPackage = Nothing, _vlCpeURI = Nothing}
vlVersion :: Lens' VulnerabilityLocation (Maybe Version)
vlVersion
= lens _vlVersion (\ s a -> s{_vlVersion = a})
vlPackage :: Lens' VulnerabilityLocation (Maybe Text)
vlPackage
= lens _vlPackage (\ s a -> s{_vlPackage = a})
vlCpeURI :: Lens' VulnerabilityLocation (Maybe Text)
vlCpeURI = lens _vlCpeURI (\ s a -> s{_vlCpeURI = a})
instance FromJSON VulnerabilityLocation where
parseJSON
= withObject "VulnerabilityLocation"
(\ o ->
VulnerabilityLocation' <$>
(o .:? "version") <*> (o .:? "package") <*>
(o .:? "cpeUri"))
instance ToJSON VulnerabilityLocation where
toJSON VulnerabilityLocation'{..}
= object
(catMaybes
[("version" .=) <$> _vlVersion,
("package" .=) <$> _vlPackage,
("cpeUri" .=) <$> _vlCpeURI])
data FixableTotalByDigest =
FixableTotalByDigest'
{ _ftbdSeverity :: !(Maybe FixableTotalByDigestSeverity)
, _ftbdFixableCount :: !(Maybe (Textual Int64))
, _ftbdResource :: !(Maybe Resource)
, _ftbdTotalCount :: !(Maybe (Textual Int64))
}
deriving (Eq, Show, Data, Typeable, Generic)
fixableTotalByDigest
:: FixableTotalByDigest
fixableTotalByDigest =
FixableTotalByDigest'
{ _ftbdSeverity = Nothing
, _ftbdFixableCount = Nothing
, _ftbdResource = Nothing
, _ftbdTotalCount = Nothing
}
ftbdSeverity :: Lens' FixableTotalByDigest (Maybe FixableTotalByDigestSeverity)
ftbdSeverity
= lens _ftbdSeverity (\ s a -> s{_ftbdSeverity = a})
ftbdFixableCount :: Lens' FixableTotalByDigest (Maybe Int64)
ftbdFixableCount
= lens _ftbdFixableCount
(\ s a -> s{_ftbdFixableCount = a})
. mapping _Coerce
ftbdResource :: Lens' FixableTotalByDigest (Maybe Resource)
ftbdResource
= lens _ftbdResource (\ s a -> s{_ftbdResource = a})
ftbdTotalCount :: Lens' FixableTotalByDigest (Maybe Int64)
ftbdTotalCount
= lens _ftbdTotalCount
(\ s a -> s{_ftbdTotalCount = a})
. mapping _Coerce
instance FromJSON FixableTotalByDigest where
parseJSON
= withObject "FixableTotalByDigest"
(\ o ->
FixableTotalByDigest' <$>
(o .:? "severity") <*> (o .:? "fixableCount") <*>
(o .:? "resource")
<*> (o .:? "totalCount"))
instance ToJSON FixableTotalByDigest where
toJSON FixableTotalByDigest'{..}
= object
(catMaybes
[("severity" .=) <$> _ftbdSeverity,
("fixableCount" .=) <$> _ftbdFixableCount,
("resource" .=) <$> _ftbdResource,
("totalCount" .=) <$> _ftbdTotalCount])
data RelatedURL =
RelatedURL'
{ _ruURL :: !(Maybe Text)
, _ruLabel :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
relatedURL
:: RelatedURL
relatedURL = RelatedURL' {_ruURL = Nothing, _ruLabel = Nothing}
ruURL :: Lens' RelatedURL (Maybe Text)
ruURL = lens _ruURL (\ s a -> s{_ruURL = a})
ruLabel :: Lens' RelatedURL (Maybe Text)
ruLabel = lens _ruLabel (\ s a -> s{_ruLabel = a})
instance FromJSON RelatedURL where
parseJSON
= withObject "RelatedURL"
(\ o ->
RelatedURL' <$> (o .:? "url") <*> (o .:? "label"))
instance ToJSON RelatedURL where
toJSON RelatedURL'{..}
= object
(catMaybes
[("url" .=) <$> _ruURL, ("label" .=) <$> _ruLabel])
newtype GrafeasV1beta1ImageDetails =
GrafeasV1beta1ImageDetails'
{ _gvidDerivedImage :: Maybe Derived
}
deriving (Eq, Show, Data, Typeable, Generic)
grafeasV1beta1ImageDetails
:: GrafeasV1beta1ImageDetails
grafeasV1beta1ImageDetails =
GrafeasV1beta1ImageDetails' {_gvidDerivedImage = Nothing}
gvidDerivedImage :: Lens' GrafeasV1beta1ImageDetails (Maybe Derived)
gvidDerivedImage
= lens _gvidDerivedImage
(\ s a -> s{_gvidDerivedImage = a})
instance FromJSON GrafeasV1beta1ImageDetails where
parseJSON
= withObject "GrafeasV1beta1ImageDetails"
(\ o ->
GrafeasV1beta1ImageDetails' <$>
(o .:? "derivedImage"))
instance ToJSON GrafeasV1beta1ImageDetails where
toJSON GrafeasV1beta1ImageDetails'{..}
= object
(catMaybes
[("derivedImage" .=) <$> _gvidDerivedImage])
newtype BatchCreateOccurrencesResponse =
BatchCreateOccurrencesResponse'
{ _bOccurrences :: Maybe [Occurrence]
}
deriving (Eq, Show, Data, Typeable, Generic)
batchCreateOccurrencesResponse
:: BatchCreateOccurrencesResponse
batchCreateOccurrencesResponse =
BatchCreateOccurrencesResponse' {_bOccurrences = Nothing}
bOccurrences :: Lens' BatchCreateOccurrencesResponse [Occurrence]
bOccurrences
= lens _bOccurrences (\ s a -> s{_bOccurrences = a})
. _Default
. _Coerce
instance FromJSON BatchCreateOccurrencesResponse
where
parseJSON
= withObject "BatchCreateOccurrencesResponse"
(\ o ->
BatchCreateOccurrencesResponse' <$>
(o .:? "occurrences" .!= mempty))
instance ToJSON BatchCreateOccurrencesResponse where
toJSON BatchCreateOccurrencesResponse'{..}
= object
(catMaybes [("occurrences" .=) <$> _bOccurrences])
newtype SourceContextLabels =
SourceContextLabels'
{ _sclAddtional :: HashMap Text Text
}
deriving (Eq, Show, Data, Typeable, Generic)
sourceContextLabels
:: HashMap Text Text
-> SourceContextLabels
sourceContextLabels pSclAddtional_ =
SourceContextLabels' {_sclAddtional = _Coerce # pSclAddtional_}
sclAddtional :: Lens' SourceContextLabels (HashMap Text Text)
sclAddtional
= lens _sclAddtional (\ s a -> s{_sclAddtional = a})
. _Coerce
instance FromJSON SourceContextLabels where
parseJSON
= withObject "SourceContextLabels"
(\ o -> SourceContextLabels' <$> (parseJSONObject o))
instance ToJSON SourceContextLabels where
toJSON = toJSON . _sclAddtional
data ListScanConfigsResponse =
ListScanConfigsResponse'
{ _lscrNextPageToken :: !(Maybe Text)
, _lscrScanConfigs :: !(Maybe [ScanConfig])
}
deriving (Eq, Show, Data, Typeable, Generic)
listScanConfigsResponse
:: ListScanConfigsResponse
listScanConfigsResponse =
ListScanConfigsResponse'
{_lscrNextPageToken = Nothing, _lscrScanConfigs = Nothing}
lscrNextPageToken :: Lens' ListScanConfigsResponse (Maybe Text)
lscrNextPageToken
= lens _lscrNextPageToken
(\ s a -> s{_lscrNextPageToken = a})
lscrScanConfigs :: Lens' ListScanConfigsResponse [ScanConfig]
lscrScanConfigs
= lens _lscrScanConfigs
(\ s a -> s{_lscrScanConfigs = a})
. _Default
. _Coerce
instance FromJSON ListScanConfigsResponse where
parseJSON
= withObject "ListScanConfigsResponse"
(\ o ->
ListScanConfigsResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "scanConfigs" .!= mempty))
instance ToJSON ListScanConfigsResponse where
toJSON ListScanConfigsResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lscrNextPageToken,
("scanConfigs" .=) <$> _lscrScanConfigs])
data Version =
Version'
{ _vKind :: !(Maybe VersionKind)
, _vName :: !(Maybe Text)
, _vRevision :: !(Maybe Text)
, _vEpoch :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
version
:: Version
version =
Version'
{ _vKind = Nothing
, _vName = Nothing
, _vRevision = Nothing
, _vEpoch = Nothing
}
vKind :: Lens' Version (Maybe VersionKind)
vKind = lens _vKind (\ s a -> s{_vKind = a})
vName :: Lens' Version (Maybe Text)
vName = lens _vName (\ s a -> s{_vName = a})
vRevision :: Lens' Version (Maybe Text)
vRevision
= lens _vRevision (\ s a -> s{_vRevision = a})
vEpoch :: Lens' Version (Maybe Int32)
vEpoch
= lens _vEpoch (\ s a -> s{_vEpoch = a}) .
mapping _Coerce
instance FromJSON Version where
parseJSON
= withObject "Version"
(\ o ->
Version' <$>
(o .:? "kind") <*> (o .:? "name") <*>
(o .:? "revision")
<*> (o .:? "epoch"))
instance ToJSON Version where
toJSON Version'{..}
= object
(catMaybes
[("kind" .=) <$> _vKind, ("name" .=) <$> _vName,
("revision" .=) <$> _vRevision,
("epoch" .=) <$> _vEpoch])
newtype FileHashes =
FileHashes'
{ _fhFileHash :: Maybe [Hash]
}
deriving (Eq, Show, Data, Typeable, Generic)
fileHashes
:: FileHashes
fileHashes = FileHashes' {_fhFileHash = Nothing}
fhFileHash :: Lens' FileHashes [Hash]
fhFileHash
= lens _fhFileHash (\ s a -> s{_fhFileHash = a}) .
_Default
. _Coerce
instance FromJSON FileHashes where
parseJSON
= withObject "FileHashes"
(\ o ->
FileHashes' <$> (o .:? "fileHash" .!= mempty))
instance ToJSON FileHashes where
toJSON FileHashes'{..}
= object
(catMaybes [("fileHash" .=) <$> _fhFileHash])
data Resource =
Resource'
{ _rContentHash :: !(Maybe Hash)
, _rURI :: !(Maybe Text)
, _rName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
resource
:: Resource
resource =
Resource' {_rContentHash = Nothing, _rURI = Nothing, _rName = Nothing}
rContentHash :: Lens' Resource (Maybe Hash)
rContentHash
= lens _rContentHash (\ s a -> s{_rContentHash = a})
rURI :: Lens' Resource (Maybe Text)
rURI = lens _rURI (\ s a -> s{_rURI = a})
rName :: Lens' Resource (Maybe Text)
rName = lens _rName (\ s a -> s{_rName = a})
instance FromJSON Resource where
parseJSON
= withObject "Resource"
(\ o ->
Resource' <$>
(o .:? "contentHash") <*> (o .:? "uri") <*>
(o .:? "name"))
instance ToJSON Resource where
toJSON Resource'{..}
= object
(catMaybes
[("contentHash" .=) <$> _rContentHash,
("uri" .=) <$> _rURI, ("name" .=) <$> _rName])
newtype GrafeasV1beta1DeploymentDetails =
GrafeasV1beta1DeploymentDetails'
{ _gvddDeployment :: Maybe Deployment
}
deriving (Eq, Show, Data, Typeable, Generic)
grafeasV1beta1DeploymentDetails
:: GrafeasV1beta1DeploymentDetails
grafeasV1beta1DeploymentDetails =
GrafeasV1beta1DeploymentDetails' {_gvddDeployment = Nothing}
gvddDeployment :: Lens' GrafeasV1beta1DeploymentDetails (Maybe Deployment)
gvddDeployment
= lens _gvddDeployment
(\ s a -> s{_gvddDeployment = a})
instance FromJSON GrafeasV1beta1DeploymentDetails
where
parseJSON
= withObject "GrafeasV1beta1DeploymentDetails"
(\ o ->
GrafeasV1beta1DeploymentDetails' <$>
(o .:? "deployment"))
instance ToJSON GrafeasV1beta1DeploymentDetails where
toJSON GrafeasV1beta1DeploymentDetails'{..}
= object
(catMaybes [("deployment" .=) <$> _gvddDeployment])
data GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata =
GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata'
{ _gdcvomEndTime :: !(Maybe DateTime')
, _gdcvomCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
googleDevtoolsContaineranalysisV1alpha1OperationMetadata
:: GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata
googleDevtoolsContaineranalysisV1alpha1OperationMetadata =
GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata'
{_gdcvomEndTime = Nothing, _gdcvomCreateTime = Nothing}
gdcvomEndTime :: Lens' GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata (Maybe UTCTime)
gdcvomEndTime
= lens _gdcvomEndTime
(\ s a -> s{_gdcvomEndTime = a})
. mapping _DateTime
gdcvomCreateTime :: Lens' GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata (Maybe UTCTime)
gdcvomCreateTime
= lens _gdcvomCreateTime
(\ s a -> s{_gdcvomCreateTime = a})
. mapping _DateTime
instance FromJSON
GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata
where
parseJSON
= withObject
"GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata"
(\ o ->
GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata'
<$> (o .:? "endTime") <*> (o .:? "createTime"))
instance ToJSON
GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata
where
toJSON
GoogleDevtoolsContaineranalysisV1alpha1OperationMetadata'{..}
= object
(catMaybes
[("endTime" .=) <$> _gdcvomEndTime,
("createTime" .=) <$> _gdcvomCreateTime])
newtype Details =
Details'
{ _dAttestation :: Maybe Attestation
}
deriving (Eq, Show, Data, Typeable, Generic)
details
:: Details
details = Details' {_dAttestation = Nothing}
dAttestation :: Lens' Details (Maybe Attestation)
dAttestation
= lens _dAttestation (\ s a -> s{_dAttestation = a})
instance FromJSON Details where
parseJSON
= withObject "Details"
(\ o -> Details' <$> (o .:? "attestation"))
instance ToJSON Details where
toJSON Details'{..}
= object
(catMaybes [("attestation" .=) <$> _dAttestation])
data Package =
Package'
{ _pDistribution :: !(Maybe [Distribution])
, _pName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
package
:: Package
package = Package' {_pDistribution = Nothing, _pName = Nothing}
pDistribution :: Lens' Package [Distribution]
pDistribution
= lens _pDistribution
(\ s a -> s{_pDistribution = a})
. _Default
. _Coerce
pName :: Lens' Package (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a})
instance FromJSON Package where
parseJSON
= withObject "Package"
(\ o ->
Package' <$>
(o .:? "distribution" .!= mempty) <*> (o .:? "name"))
instance ToJSON Package where
toJSON Package'{..}
= object
(catMaybes
[("distribution" .=) <$> _pDistribution,
("name" .=) <$> _pName])
data ListNotesResponse =
ListNotesResponse'
{ _lnrNextPageToken :: !(Maybe Text)
, _lnrNotes :: !(Maybe [Note])
}
deriving (Eq, Show, Data, Typeable, Generic)
listNotesResponse
:: ListNotesResponse
listNotesResponse =
ListNotesResponse' {_lnrNextPageToken = Nothing, _lnrNotes = Nothing}
lnrNextPageToken :: Lens' ListNotesResponse (Maybe Text)
lnrNextPageToken
= lens _lnrNextPageToken
(\ s a -> s{_lnrNextPageToken = a})
lnrNotes :: Lens' ListNotesResponse [Note]
lnrNotes
= lens _lnrNotes (\ s a -> s{_lnrNotes = a}) .
_Default
. _Coerce
instance FromJSON ListNotesResponse where
parseJSON
= withObject "ListNotesResponse"
(\ o ->
ListNotesResponse' <$>
(o .:? "nextPageToken") <*>
(o .:? "notes" .!= mempty))
instance ToJSON ListNotesResponse where
toJSON ListNotesResponse'{..}
= object
(catMaybes
[("nextPageToken" .=) <$> _lnrNextPageToken,
("notes" .=) <$> _lnrNotes])
data BuildSignature =
BuildSignature'
{ _bsSignature :: !(Maybe Bytes)
, _bsKeyType :: !(Maybe BuildSignatureKeyType)
, _bsKeyId :: !(Maybe Text)
, _bsPublicKey :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
buildSignature
:: BuildSignature
buildSignature =
BuildSignature'
{ _bsSignature = Nothing
, _bsKeyType = Nothing
, _bsKeyId = Nothing
, _bsPublicKey = Nothing
}
bsSignature :: Lens' BuildSignature (Maybe ByteString)
bsSignature
= lens _bsSignature (\ s a -> s{_bsSignature = a}) .
mapping _Bytes
bsKeyType :: Lens' BuildSignature (Maybe BuildSignatureKeyType)
bsKeyType
= lens _bsKeyType (\ s a -> s{_bsKeyType = a})
bsKeyId :: Lens' BuildSignature (Maybe Text)
bsKeyId = lens _bsKeyId (\ s a -> s{_bsKeyId = a})
bsPublicKey :: Lens' BuildSignature (Maybe Text)
bsPublicKey
= lens _bsPublicKey (\ s a -> s{_bsPublicKey = a})
instance FromJSON BuildSignature where
parseJSON
= withObject "BuildSignature"
(\ o ->
BuildSignature' <$>
(o .:? "signature") <*> (o .:? "keyType") <*>
(o .:? "keyId")
<*> (o .:? "publicKey"))
instance ToJSON BuildSignature where
toJSON BuildSignature'{..}
= object
(catMaybes
[("signature" .=) <$> _bsSignature,
("keyType" .=) <$> _bsKeyType,
("keyId" .=) <$> _bsKeyId,
("publicKey" .=) <$> _bsPublicKey])
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])
data Discovered =
Discovered'
{ _dLastAnalysisTime :: !(Maybe DateTime')
, _dAnalysisStatusError :: !(Maybe Status)
, _dAnalysisStatus :: !(Maybe DiscoveredAnalysisStatus)
, _dContinuousAnalysis :: !(Maybe DiscoveredContinuousAnalysis)
}
deriving (Eq, Show, Data, Typeable, Generic)
discovered
:: Discovered
discovered =
Discovered'
{ _dLastAnalysisTime = Nothing
, _dAnalysisStatusError = Nothing
, _dAnalysisStatus = Nothing
, _dContinuousAnalysis = Nothing
}
dLastAnalysisTime :: Lens' Discovered (Maybe UTCTime)
dLastAnalysisTime
= lens _dLastAnalysisTime
(\ s a -> s{_dLastAnalysisTime = a})
. mapping _DateTime
dAnalysisStatusError :: Lens' Discovered (Maybe Status)
dAnalysisStatusError
= lens _dAnalysisStatusError
(\ s a -> s{_dAnalysisStatusError = a})
dAnalysisStatus :: Lens' Discovered (Maybe DiscoveredAnalysisStatus)
dAnalysisStatus
= lens _dAnalysisStatus
(\ s a -> s{_dAnalysisStatus = a})
dContinuousAnalysis :: Lens' Discovered (Maybe DiscoveredContinuousAnalysis)
dContinuousAnalysis
= lens _dContinuousAnalysis
(\ s a -> s{_dContinuousAnalysis = a})
instance FromJSON Discovered where
parseJSON
= withObject "Discovered"
(\ o ->
Discovered' <$>
(o .:? "lastAnalysisTime") <*>
(o .:? "analysisStatusError")
<*> (o .:? "analysisStatus")
<*> (o .:? "continuousAnalysis"))
instance ToJSON Discovered where
toJSON Discovered'{..}
= object
(catMaybes
[("lastAnalysisTime" .=) <$> _dLastAnalysisTime,
("analysisStatusError" .=) <$> _dAnalysisStatusError,
("analysisStatus" .=) <$> _dAnalysisStatus,
("continuousAnalysis" .=) <$> _dContinuousAnalysis])
data Derived =
Derived'
{ _dBaseResourceURL :: !(Maybe Text)
, _dFingerprint :: !(Maybe Fingerprint)
, _dDistance :: !(Maybe (Textual Int32))
, _dLayerInfo :: !(Maybe [Layer])
}
deriving (Eq, Show, Data, Typeable, Generic)
derived
:: Derived
derived =
Derived'
{ _dBaseResourceURL = Nothing
, _dFingerprint = Nothing
, _dDistance = Nothing
, _dLayerInfo = Nothing
}
dBaseResourceURL :: Lens' Derived (Maybe Text)
dBaseResourceURL
= lens _dBaseResourceURL
(\ s a -> s{_dBaseResourceURL = a})
dFingerprint :: Lens' Derived (Maybe Fingerprint)
dFingerprint
= lens _dFingerprint (\ s a -> s{_dFingerprint = a})
dDistance :: Lens' Derived (Maybe Int32)
dDistance
= lens _dDistance (\ s a -> s{_dDistance = a}) .
mapping _Coerce
dLayerInfo :: Lens' Derived [Layer]
dLayerInfo
= lens _dLayerInfo (\ s a -> s{_dLayerInfo = a}) .
_Default
. _Coerce
instance FromJSON Derived where
parseJSON
= withObject "Derived"
(\ o ->
Derived' <$>
(o .:? "baseResourceUrl") <*> (o .:? "fingerprint")
<*> (o .:? "distance")
<*> (o .:? "layerInfo" .!= mempty))
instance ToJSON Derived where
toJSON Derived'{..}
= object
(catMaybes
[("baseResourceUrl" .=) <$> _dBaseResourceURL,
("fingerprint" .=) <$> _dFingerprint,
("distance" .=) <$> _dDistance,
("layerInfo" .=) <$> _dLayerInfo])
data GrafeasV1beta1BuildDetails =
GrafeasV1beta1BuildDetails'
{ _gvbdProvenanceBytes :: !(Maybe Text)
, _gvbdProvenance :: !(Maybe BuildProvenance)
}
deriving (Eq, Show, Data, Typeable, Generic)
grafeasV1beta1BuildDetails
:: GrafeasV1beta1BuildDetails
grafeasV1beta1BuildDetails =
GrafeasV1beta1BuildDetails'
{_gvbdProvenanceBytes = Nothing, _gvbdProvenance = Nothing}
gvbdProvenanceBytes :: Lens' GrafeasV1beta1BuildDetails (Maybe Text)
gvbdProvenanceBytes
= lens _gvbdProvenanceBytes
(\ s a -> s{_gvbdProvenanceBytes = a})
gvbdProvenance :: Lens' GrafeasV1beta1BuildDetails (Maybe BuildProvenance)
gvbdProvenance
= lens _gvbdProvenance
(\ s a -> s{_gvbdProvenance = a})
instance FromJSON GrafeasV1beta1BuildDetails where
parseJSON
= withObject "GrafeasV1beta1BuildDetails"
(\ o ->
GrafeasV1beta1BuildDetails' <$>
(o .:? "provenanceBytes") <*> (o .:? "provenance"))
instance ToJSON GrafeasV1beta1BuildDetails where
toJSON GrafeasV1beta1BuildDetails'{..}
= object
(catMaybes
[("provenanceBytes" .=) <$> _gvbdProvenanceBytes,
("provenance" .=) <$> _gvbdProvenance])
data Source =
Source'
{ _sContext :: !(Maybe SourceContext)
, _sAdditionalContexts :: !(Maybe [SourceContext])
, _sArtifactStorageSourceURI :: !(Maybe Text)
, _sFileHashes :: !(Maybe SourceFileHashes)
}
deriving (Eq, Show, Data, Typeable, Generic)
source
:: Source
source =
Source'
{ _sContext = Nothing
, _sAdditionalContexts = Nothing
, _sArtifactStorageSourceURI = Nothing
, _sFileHashes = Nothing
}
sContext :: Lens' Source (Maybe SourceContext)
sContext = lens _sContext (\ s a -> s{_sContext = a})
sAdditionalContexts :: Lens' Source [SourceContext]
sAdditionalContexts
= lens _sAdditionalContexts
(\ s a -> s{_sAdditionalContexts = a})
. _Default
. _Coerce
sArtifactStorageSourceURI :: Lens' Source (Maybe Text)
sArtifactStorageSourceURI
= lens _sArtifactStorageSourceURI
(\ s a -> s{_sArtifactStorageSourceURI = a})
sFileHashes :: Lens' Source (Maybe SourceFileHashes)
sFileHashes
= lens _sFileHashes (\ s a -> s{_sFileHashes = a})
instance FromJSON Source where
parseJSON
= withObject "Source"
(\ o ->
Source' <$>
(o .:? "context") <*>
(o .:? "additionalContexts" .!= mempty)
<*> (o .:? "artifactStorageSourceUri")
<*> (o .:? "fileHashes"))
instance ToJSON Source where
toJSON Source'{..}
= object
(catMaybes
[("context" .=) <$> _sContext,
("additionalContexts" .=) <$> _sAdditionalContexts,
("artifactStorageSourceUri" .=) <$>
_sArtifactStorageSourceURI,
("fileHashes" .=) <$> _sFileHashes])
data ScanConfig =
ScanConfig'
{ _scEnabled :: !(Maybe Bool)
, _scUpdateTime :: !(Maybe DateTime')
, _scName :: !(Maybe Text)
, _scDescription :: !(Maybe Text)
, _scCreateTime :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
scanConfig
:: ScanConfig
scanConfig =
ScanConfig'
{ _scEnabled = Nothing
, _scUpdateTime = Nothing
, _scName = Nothing
, _scDescription = Nothing
, _scCreateTime = Nothing
}
scEnabled :: Lens' ScanConfig (Maybe Bool)
scEnabled
= lens _scEnabled (\ s a -> s{_scEnabled = a})
scUpdateTime :: Lens' ScanConfig (Maybe UTCTime)
scUpdateTime
= lens _scUpdateTime (\ s a -> s{_scUpdateTime = a})
. mapping _DateTime
scName :: Lens' ScanConfig (Maybe Text)
scName = lens _scName (\ s a -> s{_scName = a})
scDescription :: Lens' ScanConfig (Maybe Text)
scDescription
= lens _scDescription
(\ s a -> s{_scDescription = a})
scCreateTime :: Lens' ScanConfig (Maybe UTCTime)
scCreateTime
= lens _scCreateTime (\ s a -> s{_scCreateTime = a})
. mapping _DateTime
instance FromJSON ScanConfig where
parseJSON
= withObject "ScanConfig"
(\ o ->
ScanConfig' <$>
(o .:? "enabled") <*> (o .:? "updateTime") <*>
(o .:? "name")
<*> (o .:? "description")
<*> (o .:? "createTime"))
instance ToJSON ScanConfig where
toJSON ScanConfig'{..}
= object
(catMaybes
[("enabled" .=) <$> _scEnabled,
("updateTime" .=) <$> _scUpdateTime,
("name" .=) <$> _scName,
("description" .=) <$> _scDescription,
("createTime" .=) <$> _scCreateTime])
data GenericSignedAttestation =
GenericSignedAttestation'
{ _gsaSerializedPayload :: !(Maybe Bytes)
, _gsaSignatures :: !(Maybe [Signature])
, _gsaContentType :: !(Maybe GenericSignedAttestationContentType)
}
deriving (Eq, Show, Data, Typeable, Generic)
genericSignedAttestation
:: GenericSignedAttestation
genericSignedAttestation =
GenericSignedAttestation'
{ _gsaSerializedPayload = Nothing
, _gsaSignatures = Nothing
, _gsaContentType = Nothing
}
gsaSerializedPayload :: Lens' GenericSignedAttestation (Maybe ByteString)
gsaSerializedPayload
= lens _gsaSerializedPayload
(\ s a -> s{_gsaSerializedPayload = a})
. mapping _Bytes
gsaSignatures :: Lens' GenericSignedAttestation [Signature]
gsaSignatures
= lens _gsaSignatures
(\ s a -> s{_gsaSignatures = a})
. _Default
. _Coerce
gsaContentType :: Lens' GenericSignedAttestation (Maybe GenericSignedAttestationContentType)
gsaContentType
= lens _gsaContentType
(\ s a -> s{_gsaContentType = a})
instance FromJSON GenericSignedAttestation where
parseJSON
= withObject "GenericSignedAttestation"
(\ o ->
GenericSignedAttestation' <$>
(o .:? "serializedPayload") <*>
(o .:? "signatures" .!= mempty)
<*> (o .:? "contentType"))
instance ToJSON GenericSignedAttestation where
toJSON GenericSignedAttestation'{..}
= object
(catMaybes
[("serializedPayload" .=) <$> _gsaSerializedPayload,
("signatures" .=) <$> _gsaSignatures,
("contentType" .=) <$> _gsaContentType])
data GitSourceContext =
GitSourceContext'
{ _gURL :: !(Maybe Text)
, _gRevisionId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
gitSourceContext
:: GitSourceContext
gitSourceContext = GitSourceContext' {_gURL = Nothing, _gRevisionId = Nothing}
gURL :: Lens' GitSourceContext (Maybe Text)
gURL = lens _gURL (\ s a -> s{_gURL = a})
gRevisionId :: Lens' GitSourceContext (Maybe Text)
gRevisionId
= lens _gRevisionId (\ s a -> s{_gRevisionId = a})
instance FromJSON GitSourceContext where
parseJSON
= withObject "GitSourceContext"
(\ o ->
GitSourceContext' <$>
(o .:? "url") <*> (o .:? "revisionId"))
instance ToJSON GitSourceContext where
toJSON GitSourceContext'{..}
= object
(catMaybes
[("url" .=) <$> _gURL,
("revisionId" .=) <$> _gRevisionId])
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 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])
data Layer =
Layer'
{ _lDirective :: !(Maybe LayerDirective)
, _lArguments :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
layer
:: Layer
layer = Layer' {_lDirective = Nothing, _lArguments = Nothing}
lDirective :: Lens' Layer (Maybe LayerDirective)
lDirective
= lens _lDirective (\ s a -> s{_lDirective = a})
lArguments :: Lens' Layer (Maybe Text)
lArguments
= lens _lArguments (\ s a -> s{_lArguments = a})
instance FromJSON Layer where
parseJSON
= withObject "Layer"
(\ o ->
Layer' <$>
(o .:? "directive") <*> (o .:? "arguments"))
instance ToJSON Layer where
toJSON Layer'{..}
= object
(catMaybes
[("directive" .=) <$> _lDirective,
("arguments" .=) <$> _lArguments])
data CloudRepoSourceContext =
CloudRepoSourceContext'
{ _crscRepoId :: !(Maybe RepoId)
, _crscRevisionId :: !(Maybe Text)
, _crscAliasContext :: !(Maybe AliasContext)
}
deriving (Eq, Show, Data, Typeable, Generic)
cloudRepoSourceContext
:: CloudRepoSourceContext
cloudRepoSourceContext =
CloudRepoSourceContext'
{ _crscRepoId = Nothing
, _crscRevisionId = Nothing
, _crscAliasContext = Nothing
}
crscRepoId :: Lens' CloudRepoSourceContext (Maybe RepoId)
crscRepoId
= lens _crscRepoId (\ s a -> s{_crscRepoId = a})
crscRevisionId :: Lens' CloudRepoSourceContext (Maybe Text)
crscRevisionId
= lens _crscRevisionId
(\ s a -> s{_crscRevisionId = a})
crscAliasContext :: Lens' CloudRepoSourceContext (Maybe AliasContext)
crscAliasContext
= lens _crscAliasContext
(\ s a -> s{_crscAliasContext = a})
instance FromJSON CloudRepoSourceContext where
parseJSON
= withObject "CloudRepoSourceContext"
(\ o ->
CloudRepoSourceContext' <$>
(o .:? "repoId") <*> (o .:? "revisionId") <*>
(o .:? "aliasContext"))
instance ToJSON CloudRepoSourceContext where
toJSON CloudRepoSourceContext'{..}
= object
(catMaybes
[("repoId" .=) <$> _crscRepoId,
("revisionId" .=) <$> _crscRevisionId,
("aliasContext" .=) <$> _crscAliasContext])
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 PgpSignedAttestation =
PgpSignedAttestation'
{ _psaSignature :: !(Maybe Text)
, _psaPgpKeyId :: !(Maybe Text)
, _psaContentType :: !(Maybe PgpSignedAttestationContentType)
}
deriving (Eq, Show, Data, Typeable, Generic)
pgpSignedAttestation
:: PgpSignedAttestation
pgpSignedAttestation =
PgpSignedAttestation'
{_psaSignature = Nothing, _psaPgpKeyId = Nothing, _psaContentType = Nothing}
psaSignature :: Lens' PgpSignedAttestation (Maybe Text)
psaSignature
= lens _psaSignature (\ s a -> s{_psaSignature = a})
psaPgpKeyId :: Lens' PgpSignedAttestation (Maybe Text)
psaPgpKeyId
= lens _psaPgpKeyId (\ s a -> s{_psaPgpKeyId = a})
psaContentType :: Lens' PgpSignedAttestation (Maybe PgpSignedAttestationContentType)
psaContentType
= lens _psaContentType
(\ s a -> s{_psaContentType = a})
instance FromJSON PgpSignedAttestation where
parseJSON
= withObject "PgpSignedAttestation"
(\ o ->
PgpSignedAttestation' <$>
(o .:? "signature") <*> (o .:? "pgpKeyId") <*>
(o .:? "contentType"))
instance ToJSON PgpSignedAttestation where
toJSON PgpSignedAttestation'{..}
= object
(catMaybes
[("signature" .=) <$> _psaSignature,
("pgpKeyId" .=) <$> _psaPgpKeyId,
("contentType" .=) <$> _psaContentType])
data WindowsDetail =
WindowsDetail'
{ _wdName :: !(Maybe Text)
, _wdFixingKbs :: !(Maybe [KnowledgeBase])
, _wdCpeURI :: !(Maybe Text)
, _wdDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
windowsDetail
:: WindowsDetail
windowsDetail =
WindowsDetail'
{ _wdName = Nothing
, _wdFixingKbs = Nothing
, _wdCpeURI = Nothing
, _wdDescription = Nothing
}
wdName :: Lens' WindowsDetail (Maybe Text)
wdName = lens _wdName (\ s a -> s{_wdName = a})
wdFixingKbs :: Lens' WindowsDetail [KnowledgeBase]
wdFixingKbs
= lens _wdFixingKbs (\ s a -> s{_wdFixingKbs = a}) .
_Default
. _Coerce
wdCpeURI :: Lens' WindowsDetail (Maybe Text)
wdCpeURI = lens _wdCpeURI (\ s a -> s{_wdCpeURI = a})
wdDescription :: Lens' WindowsDetail (Maybe Text)
wdDescription
= lens _wdDescription
(\ s a -> s{_wdDescription = a})
instance FromJSON WindowsDetail where
parseJSON
= withObject "WindowsDetail"
(\ o ->
WindowsDetail' <$>
(o .:? "name") <*> (o .:? "fixingKbs" .!= mempty) <*>
(o .:? "cpeUri")
<*> (o .:? "description"))
instance ToJSON WindowsDetail where
toJSON WindowsDetail'{..}
= object
(catMaybes
[("name" .=) <$> _wdName,
("fixingKbs" .=) <$> _wdFixingKbs,
("cpeUri" .=) <$> _wdCpeURI,
("description" .=) <$> _wdDescription])
newtype BatchCreateNotesRequestNotes =
BatchCreateNotesRequestNotes'
{ _bcnrnAddtional :: HashMap Text Note
}
deriving (Eq, Show, Data, Typeable, Generic)
batchCreateNotesRequestNotes
:: HashMap Text Note
-> BatchCreateNotesRequestNotes
batchCreateNotesRequestNotes pBcnrnAddtional_ =
BatchCreateNotesRequestNotes' {_bcnrnAddtional = _Coerce # pBcnrnAddtional_}
bcnrnAddtional :: Lens' BatchCreateNotesRequestNotes (HashMap Text Note)
bcnrnAddtional
= lens _bcnrnAddtional
(\ s a -> s{_bcnrnAddtional = a})
. _Coerce
instance FromJSON BatchCreateNotesRequestNotes where
parseJSON
= withObject "BatchCreateNotesRequestNotes"
(\ o ->
BatchCreateNotesRequestNotes' <$>
(parseJSONObject o))
instance ToJSON BatchCreateNotesRequestNotes where
toJSON = toJSON . _bcnrnAddtional
data AliasContext =
AliasContext'
{ _acKind :: !(Maybe AliasContextKind)
, _acName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
aliasContext
:: AliasContext
aliasContext = AliasContext' {_acKind = Nothing, _acName = Nothing}
acKind :: Lens' AliasContext (Maybe AliasContextKind)
acKind = lens _acKind (\ s a -> s{_acKind = a})
acName :: Lens' AliasContext (Maybe Text)
acName = lens _acName (\ s a -> s{_acName = a})
instance FromJSON AliasContext where
parseJSON
= withObject "AliasContext"
(\ o ->
AliasContext' <$> (o .:? "kind") <*> (o .:? "name"))
instance ToJSON AliasContext where
toJSON AliasContext'{..}
= object
(catMaybes
[("kind" .=) <$> _acKind, ("name" .=) <$> _acName])
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])
data Detail =
Detail'
{ _detMinAffectedVersion :: !(Maybe Version)
, _detPackageType :: !(Maybe Text)
, _detIsObsolete :: !(Maybe Bool)
, _detFixedLocation :: !(Maybe VulnerabilityLocation)
, _detSeverityName :: !(Maybe Text)
, _detMaxAffectedVersion :: !(Maybe Version)
, _detPackage :: !(Maybe Text)
, _detCpeURI :: !(Maybe Text)
, _detDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
detail
:: Detail
detail =
Detail'
{ _detMinAffectedVersion = Nothing
, _detPackageType = Nothing
, _detIsObsolete = Nothing
, _detFixedLocation = Nothing
, _detSeverityName = Nothing
, _detMaxAffectedVersion = Nothing
, _detPackage = Nothing
, _detCpeURI = Nothing
, _detDescription = Nothing
}
detMinAffectedVersion :: Lens' Detail (Maybe Version)
detMinAffectedVersion
= lens _detMinAffectedVersion
(\ s a -> s{_detMinAffectedVersion = a})
detPackageType :: Lens' Detail (Maybe Text)
detPackageType
= lens _detPackageType
(\ s a -> s{_detPackageType = a})
detIsObsolete :: Lens' Detail (Maybe Bool)
detIsObsolete
= lens _detIsObsolete
(\ s a -> s{_detIsObsolete = a})
detFixedLocation :: Lens' Detail (Maybe VulnerabilityLocation)
detFixedLocation
= lens _detFixedLocation
(\ s a -> s{_detFixedLocation = a})
detSeverityName :: Lens' Detail (Maybe Text)
detSeverityName
= lens _detSeverityName
(\ s a -> s{_detSeverityName = a})
detMaxAffectedVersion :: Lens' Detail (Maybe Version)
detMaxAffectedVersion
= lens _detMaxAffectedVersion
(\ s a -> s{_detMaxAffectedVersion = a})
detPackage :: Lens' Detail (Maybe Text)
detPackage
= lens _detPackage (\ s a -> s{_detPackage = a})
detCpeURI :: Lens' Detail (Maybe Text)
detCpeURI
= lens _detCpeURI (\ s a -> s{_detCpeURI = a})
detDescription :: Lens' Detail (Maybe Text)
detDescription
= lens _detDescription
(\ s a -> s{_detDescription = a})
instance FromJSON Detail where
parseJSON
= withObject "Detail"
(\ o ->
Detail' <$>
(o .:? "minAffectedVersion") <*>
(o .:? "packageType")
<*> (o .:? "isObsolete")
<*> (o .:? "fixedLocation")
<*> (o .:? "severityName")
<*> (o .:? "maxAffectedVersion")
<*> (o .:? "package")
<*> (o .:? "cpeUri")
<*> (o .:? "description"))
instance ToJSON Detail where
toJSON Detail'{..}
= object
(catMaybes
[("minAffectedVersion" .=) <$>
_detMinAffectedVersion,
("packageType" .=) <$> _detPackageType,
("isObsolete" .=) <$> _detIsObsolete,
("fixedLocation" .=) <$> _detFixedLocation,
("severityName" .=) <$> _detSeverityName,
("maxAffectedVersion" .=) <$> _detMaxAffectedVersion,
("package" .=) <$> _detPackage,
("cpeUri" .=) <$> _detCpeURI,
("description" .=) <$> _detDescription])
newtype Authority =
Authority'
{ _aHint :: Maybe Hint
}
deriving (Eq, Show, Data, Typeable, Generic)
authority
:: Authority
authority = Authority' {_aHint = Nothing}
aHint :: Lens' Authority (Maybe Hint)
aHint = lens _aHint (\ s a -> s{_aHint = a})
instance FromJSON Authority where
parseJSON
= withObject "Authority"
(\ o -> Authority' <$> (o .:? "hint"))
instance ToJSON Authority where
toJSON Authority'{..}
= object (catMaybes [("hint" .=) <$> _aHint])
newtype GrafeasV1beta1PackageDetails =
GrafeasV1beta1PackageDetails'
{ _gvpdInstallation :: Maybe Installation
}
deriving (Eq, Show, Data, Typeable, Generic)
grafeasV1beta1PackageDetails
:: GrafeasV1beta1PackageDetails
grafeasV1beta1PackageDetails =
GrafeasV1beta1PackageDetails' {_gvpdInstallation = Nothing}
gvpdInstallation :: Lens' GrafeasV1beta1PackageDetails (Maybe Installation)
gvpdInstallation
= lens _gvpdInstallation
(\ s a -> s{_gvpdInstallation = a})
instance FromJSON GrafeasV1beta1PackageDetails where
parseJSON
= withObject "GrafeasV1beta1PackageDetails"
(\ o ->
GrafeasV1beta1PackageDetails' <$>
(o .:? "installation"))
instance ToJSON GrafeasV1beta1PackageDetails where
toJSON GrafeasV1beta1PackageDetails'{..}
= object
(catMaybes
[("installation" .=) <$> _gvpdInstallation])
data Deployment =
Deployment'
{ _depResourceURI :: !(Maybe [Text])
, _depPlatform :: !(Maybe DeploymentPlatform)
, _depConfig :: !(Maybe Text)
, _depUndeployTime :: !(Maybe DateTime')
, _depDeployTime :: !(Maybe DateTime')
, _depAddress :: !(Maybe Text)
, _depUserEmail :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
deployment
:: Deployment
deployment =
Deployment'
{ _depResourceURI = Nothing
, _depPlatform = Nothing
, _depConfig = Nothing
, _depUndeployTime = Nothing
, _depDeployTime = Nothing
, _depAddress = Nothing
, _depUserEmail = Nothing
}
depResourceURI :: Lens' Deployment [Text]
depResourceURI
= lens _depResourceURI
(\ s a -> s{_depResourceURI = a})
. _Default
. _Coerce
depPlatform :: Lens' Deployment (Maybe DeploymentPlatform)
depPlatform
= lens _depPlatform (\ s a -> s{_depPlatform = a})
depConfig :: Lens' Deployment (Maybe Text)
depConfig
= lens _depConfig (\ s a -> s{_depConfig = a})
depUndeployTime :: Lens' Deployment (Maybe UTCTime)
depUndeployTime
= lens _depUndeployTime
(\ s a -> s{_depUndeployTime = a})
. mapping _DateTime
depDeployTime :: Lens' Deployment (Maybe UTCTime)
depDeployTime
= lens _depDeployTime
(\ s a -> s{_depDeployTime = a})
. mapping _DateTime
depAddress :: Lens' Deployment (Maybe Text)
depAddress
= lens _depAddress (\ s a -> s{_depAddress = a})
depUserEmail :: Lens' Deployment (Maybe Text)
depUserEmail
= lens _depUserEmail (\ s a -> s{_depUserEmail = a})
instance FromJSON Deployment where
parseJSON
= withObject "Deployment"
(\ o ->
Deployment' <$>
(o .:? "resourceUri" .!= mempty) <*>
(o .:? "platform")
<*> (o .:? "config")
<*> (o .:? "undeployTime")
<*> (o .:? "deployTime")
<*> (o .:? "address")
<*> (o .:? "userEmail"))
instance ToJSON Deployment where
toJSON Deployment'{..}
= object
(catMaybes
[("resourceUri" .=) <$> _depResourceURI,
("platform" .=) <$> _depPlatform,
("config" .=) <$> _depConfig,
("undeployTime" .=) <$> _depUndeployTime,
("deployTime" .=) <$> _depDeployTime,
("address" .=) <$> _depAddress,
("userEmail" .=) <$> _depUserEmail])