{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# OPTIONS_GHC -fno-warn-duplicate-exports #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} -- | -- Module : Network.Google.Resource.ContainerAnalysis.Projects.Occurrences.GetVulnerabilitySummary -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Gets a summary of the number and severity of occurrences. -- -- /See:/ for @containeranalysis.projects.occurrences.getVulnerabilitySummary@. module Network.Google.Resource.ContainerAnalysis.Projects.Occurrences.GetVulnerabilitySummary ( -- * REST Resource ProjectsOccurrencesGetVulnerabilitySummaryResource -- * Creating a Request , projectsOccurrencesGetVulnerabilitySummary , ProjectsOccurrencesGetVulnerabilitySummary -- * Request Lenses , pogvsParent , pogvsXgafv , pogvsUploadProtocol , pogvsAccessToken , pogvsUploadType , pogvsFilter , pogvsCallback ) where import Network.Google.ContainerAnalysis.Types import Network.Google.Prelude -- | A resource alias for @containeranalysis.projects.occurrences.getVulnerabilitySummary@ method which the -- 'ProjectsOccurrencesGetVulnerabilitySummary' request conforms to. type ProjectsOccurrencesGetVulnerabilitySummaryResource = "v1beta1" :> Capture "parent" Text :> "occurrences:vulnerabilitySummary" :> QueryParam "$.xgafv" Xgafv :> QueryParam "upload_protocol" Text :> QueryParam "access_token" Text :> QueryParam "uploadType" Text :> QueryParam "filter" Text :> QueryParam "callback" Text :> QueryParam "alt" AltJSON :> Get '[JSON] VulnerabilityOccurrencesSummary -- | Gets a summary of the number and severity of occurrences. -- -- /See:/ 'projectsOccurrencesGetVulnerabilitySummary' smart constructor. data ProjectsOccurrencesGetVulnerabilitySummary = ProjectsOccurrencesGetVulnerabilitySummary' { _pogvsParent :: !Text , _pogvsXgafv :: !(Maybe Xgafv) , _pogvsUploadProtocol :: !(Maybe Text) , _pogvsAccessToken :: !(Maybe Text) , _pogvsUploadType :: !(Maybe Text) , _pogvsFilter :: !(Maybe Text) , _pogvsCallback :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'ProjectsOccurrencesGetVulnerabilitySummary' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pogvsParent' -- -- * 'pogvsXgafv' -- -- * 'pogvsUploadProtocol' -- -- * 'pogvsAccessToken' -- -- * 'pogvsUploadType' -- -- * 'pogvsFilter' -- -- * 'pogvsCallback' projectsOccurrencesGetVulnerabilitySummary :: Text -- ^ 'pogvsParent' -> ProjectsOccurrencesGetVulnerabilitySummary projectsOccurrencesGetVulnerabilitySummary pPogvsParent_ = ProjectsOccurrencesGetVulnerabilitySummary' { _pogvsParent = pPogvsParent_ , _pogvsXgafv = Nothing , _pogvsUploadProtocol = Nothing , _pogvsAccessToken = Nothing , _pogvsUploadType = Nothing , _pogvsFilter = Nothing , _pogvsCallback = Nothing } -- | The name of the project to get a vulnerability summary for in the form -- of \`projects\/[PROJECT_ID]\`. pogvsParent :: Lens' ProjectsOccurrencesGetVulnerabilitySummary Text pogvsParent = lens _pogvsParent (\ s a -> s{_pogvsParent = a}) -- | V1 error format. pogvsXgafv :: Lens' ProjectsOccurrencesGetVulnerabilitySummary (Maybe Xgafv) pogvsXgafv = lens _pogvsXgafv (\ s a -> s{_pogvsXgafv = a}) -- | Upload protocol for media (e.g. \"raw\", \"multipart\"). pogvsUploadProtocol :: Lens' ProjectsOccurrencesGetVulnerabilitySummary (Maybe Text) pogvsUploadProtocol = lens _pogvsUploadProtocol (\ s a -> s{_pogvsUploadProtocol = a}) -- | OAuth access token. pogvsAccessToken :: Lens' ProjectsOccurrencesGetVulnerabilitySummary (Maybe Text) pogvsAccessToken = lens _pogvsAccessToken (\ s a -> s{_pogvsAccessToken = a}) -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). pogvsUploadType :: Lens' ProjectsOccurrencesGetVulnerabilitySummary (Maybe Text) pogvsUploadType = lens _pogvsUploadType (\ s a -> s{_pogvsUploadType = a}) -- | The filter expression. pogvsFilter :: Lens' ProjectsOccurrencesGetVulnerabilitySummary (Maybe Text) pogvsFilter = lens _pogvsFilter (\ s a -> s{_pogvsFilter = a}) -- | JSONP pogvsCallback :: Lens' ProjectsOccurrencesGetVulnerabilitySummary (Maybe Text) pogvsCallback = lens _pogvsCallback (\ s a -> s{_pogvsCallback = a}) instance GoogleRequest ProjectsOccurrencesGetVulnerabilitySummary where type Rs ProjectsOccurrencesGetVulnerabilitySummary = VulnerabilityOccurrencesSummary type Scopes ProjectsOccurrencesGetVulnerabilitySummary = '["https://www.googleapis.com/auth/cloud-platform"] requestClient ProjectsOccurrencesGetVulnerabilitySummary'{..} = go _pogvsParent _pogvsXgafv _pogvsUploadProtocol _pogvsAccessToken _pogvsUploadType _pogvsFilter _pogvsCallback (Just AltJSON) containerAnalysisService where go = buildClient (Proxy :: Proxy ProjectsOccurrencesGetVulnerabilitySummaryResource) mempty