{-# 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.Create
(
ProjectsOccurrencesCreateResource
, projectsOccurrencesCreate
, ProjectsOccurrencesCreate
, pocParent
, pocXgafv
, pocUploadProtocol
, pocAccessToken
, pocUploadType
, pocPayload
, pocCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsOccurrencesCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"occurrences" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Occurrence :> Post '[JSON] Occurrence
data ProjectsOccurrencesCreate = ProjectsOccurrencesCreate'
{ _pocParent :: !Text
, _pocXgafv :: !(Maybe Xgafv)
, _pocUploadProtocol :: !(Maybe Text)
, _pocAccessToken :: !(Maybe Text)
, _pocUploadType :: !(Maybe Text)
, _pocPayload :: !Occurrence
, _pocCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsOccurrencesCreate
:: Text
-> Occurrence
-> ProjectsOccurrencesCreate
projectsOccurrencesCreate pPocParent_ pPocPayload_ =
ProjectsOccurrencesCreate'
{ _pocParent = pPocParent_
, _pocXgafv = Nothing
, _pocUploadProtocol = Nothing
, _pocAccessToken = Nothing
, _pocUploadType = Nothing
, _pocPayload = pPocPayload_
, _pocCallback = Nothing
}
pocParent :: Lens' ProjectsOccurrencesCreate Text
pocParent
= lens _pocParent (\ s a -> s{_pocParent = a})
pocXgafv :: Lens' ProjectsOccurrencesCreate (Maybe Xgafv)
pocXgafv = lens _pocXgafv (\ s a -> s{_pocXgafv = a})
pocUploadProtocol :: Lens' ProjectsOccurrencesCreate (Maybe Text)
pocUploadProtocol
= lens _pocUploadProtocol
(\ s a -> s{_pocUploadProtocol = a})
pocAccessToken :: Lens' ProjectsOccurrencesCreate (Maybe Text)
pocAccessToken
= lens _pocAccessToken
(\ s a -> s{_pocAccessToken = a})
pocUploadType :: Lens' ProjectsOccurrencesCreate (Maybe Text)
pocUploadType
= lens _pocUploadType
(\ s a -> s{_pocUploadType = a})
pocPayload :: Lens' ProjectsOccurrencesCreate Occurrence
pocPayload
= lens _pocPayload (\ s a -> s{_pocPayload = a})
pocCallback :: Lens' ProjectsOccurrencesCreate (Maybe Text)
pocCallback
= lens _pocCallback (\ s a -> s{_pocCallback = a})
instance GoogleRequest ProjectsOccurrencesCreate
where
type Rs ProjectsOccurrencesCreate = Occurrence
type Scopes ProjectsOccurrencesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsOccurrencesCreate'{..}
= go _pocParent _pocXgafv _pocUploadProtocol
_pocAccessToken
_pocUploadType
_pocCallback
(Just AltJSON)
_pocPayload
containerAnalysisService
where go
= buildClient
(Proxy :: Proxy ProjectsOccurrencesCreateResource)
mempty