{-# 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.Notes.Create
(
ProjectsNotesCreateResource
, projectsNotesCreate
, ProjectsNotesCreate
, pncParent
, pncXgafv
, pncUploadProtocol
, pncAccessToken
, pncUploadType
, pncPayload
, pncNoteId
, pncCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsNotesCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"notes" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "noteId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Note :> Post '[JSON] Note
data ProjectsNotesCreate = ProjectsNotesCreate'
{ _pncParent :: !Text
, _pncXgafv :: !(Maybe Xgafv)
, _pncUploadProtocol :: !(Maybe Text)
, _pncAccessToken :: !(Maybe Text)
, _pncUploadType :: !(Maybe Text)
, _pncPayload :: !Note
, _pncNoteId :: !(Maybe Text)
, _pncCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsNotesCreate
:: Text
-> Note
-> ProjectsNotesCreate
projectsNotesCreate pPncParent_ pPncPayload_ =
ProjectsNotesCreate'
{ _pncParent = pPncParent_
, _pncXgafv = Nothing
, _pncUploadProtocol = Nothing
, _pncAccessToken = Nothing
, _pncUploadType = Nothing
, _pncPayload = pPncPayload_
, _pncNoteId = Nothing
, _pncCallback = Nothing
}
pncParent :: Lens' ProjectsNotesCreate Text
pncParent
= lens _pncParent (\ s a -> s{_pncParent = a})
pncXgafv :: Lens' ProjectsNotesCreate (Maybe Xgafv)
pncXgafv = lens _pncXgafv (\ s a -> s{_pncXgafv = a})
pncUploadProtocol :: Lens' ProjectsNotesCreate (Maybe Text)
pncUploadProtocol
= lens _pncUploadProtocol
(\ s a -> s{_pncUploadProtocol = a})
pncAccessToken :: Lens' ProjectsNotesCreate (Maybe Text)
pncAccessToken
= lens _pncAccessToken
(\ s a -> s{_pncAccessToken = a})
pncUploadType :: Lens' ProjectsNotesCreate (Maybe Text)
pncUploadType
= lens _pncUploadType
(\ s a -> s{_pncUploadType = a})
pncPayload :: Lens' ProjectsNotesCreate Note
pncPayload
= lens _pncPayload (\ s a -> s{_pncPayload = a})
pncNoteId :: Lens' ProjectsNotesCreate (Maybe Text)
pncNoteId
= lens _pncNoteId (\ s a -> s{_pncNoteId = a})
pncCallback :: Lens' ProjectsNotesCreate (Maybe Text)
pncCallback
= lens _pncCallback (\ s a -> s{_pncCallback = a})
instance GoogleRequest ProjectsNotesCreate where
type Rs ProjectsNotesCreate = Note
type Scopes ProjectsNotesCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsNotesCreate'{..}
= go _pncParent _pncXgafv _pncUploadProtocol
_pncAccessToken
_pncUploadType
_pncNoteId
_pncCallback
(Just AltJSON)
_pncPayload
containerAnalysisService
where go
= buildClient
(Proxy :: Proxy ProjectsNotesCreateResource)
mempty