{-# 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.Patch
(
ProjectsOccurrencesPatchResource
, projectsOccurrencesPatch
, ProjectsOccurrencesPatch
, popXgafv
, popUploadProtocol
, popUpdateMask
, popAccessToken
, popUploadType
, popPayload
, popName
, popCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsOccurrencesPatchResource =
"v1beta1" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Occurrence :>
Patch '[JSON] Occurrence
data ProjectsOccurrencesPatch = ProjectsOccurrencesPatch'
{ _popXgafv :: !(Maybe Xgafv)
, _popUploadProtocol :: !(Maybe Text)
, _popUpdateMask :: !(Maybe GFieldMask)
, _popAccessToken :: !(Maybe Text)
, _popUploadType :: !(Maybe Text)
, _popPayload :: !Occurrence
, _popName :: !Text
, _popCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsOccurrencesPatch
:: Occurrence
-> Text
-> ProjectsOccurrencesPatch
projectsOccurrencesPatch pPopPayload_ pPopName_ =
ProjectsOccurrencesPatch'
{ _popXgafv = Nothing
, _popUploadProtocol = Nothing
, _popUpdateMask = Nothing
, _popAccessToken = Nothing
, _popUploadType = Nothing
, _popPayload = pPopPayload_
, _popName = pPopName_
, _popCallback = Nothing
}
popXgafv :: Lens' ProjectsOccurrencesPatch (Maybe Xgafv)
popXgafv = lens _popXgafv (\ s a -> s{_popXgafv = a})
popUploadProtocol :: Lens' ProjectsOccurrencesPatch (Maybe Text)
popUploadProtocol
= lens _popUploadProtocol
(\ s a -> s{_popUploadProtocol = a})
popUpdateMask :: Lens' ProjectsOccurrencesPatch (Maybe GFieldMask)
popUpdateMask
= lens _popUpdateMask
(\ s a -> s{_popUpdateMask = a})
popAccessToken :: Lens' ProjectsOccurrencesPatch (Maybe Text)
popAccessToken
= lens _popAccessToken
(\ s a -> s{_popAccessToken = a})
popUploadType :: Lens' ProjectsOccurrencesPatch (Maybe Text)
popUploadType
= lens _popUploadType
(\ s a -> s{_popUploadType = a})
popPayload :: Lens' ProjectsOccurrencesPatch Occurrence
popPayload
= lens _popPayload (\ s a -> s{_popPayload = a})
popName :: Lens' ProjectsOccurrencesPatch Text
popName = lens _popName (\ s a -> s{_popName = a})
popCallback :: Lens' ProjectsOccurrencesPatch (Maybe Text)
popCallback
= lens _popCallback (\ s a -> s{_popCallback = a})
instance GoogleRequest ProjectsOccurrencesPatch where
type Rs ProjectsOccurrencesPatch = Occurrence
type Scopes ProjectsOccurrencesPatch =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsOccurrencesPatch'{..}
= go _popName _popXgafv _popUploadProtocol
_popUpdateMask
_popAccessToken
_popUploadType
_popCallback
(Just AltJSON)
_popPayload
containerAnalysisService
where go
= buildClient
(Proxy :: Proxy ProjectsOccurrencesPatchResource)
mempty