{-# 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.BatchCreate
(
ProjectsOccurrencesBatchCreateResource
, projectsOccurrencesBatchCreate
, ProjectsOccurrencesBatchCreate
, pobcParent
, pobcXgafv
, pobcUploadProtocol
, pobcAccessToken
, pobcUploadType
, pobcPayload
, pobcCallback
) where
import Network.Google.ContainerAnalysis.Types
import Network.Google.Prelude
type ProjectsOccurrencesBatchCreateResource =
"v1beta1" :>
Capture "parent" Text :>
"occurrences:batchCreate" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] BatchCreateOccurrencesRequest :>
Post '[JSON] BatchCreateOccurrencesResponse
data ProjectsOccurrencesBatchCreate = ProjectsOccurrencesBatchCreate'
{ _pobcParent :: !Text
, _pobcXgafv :: !(Maybe Xgafv)
, _pobcUploadProtocol :: !(Maybe Text)
, _pobcAccessToken :: !(Maybe Text)
, _pobcUploadType :: !(Maybe Text)
, _pobcPayload :: !BatchCreateOccurrencesRequest
, _pobcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsOccurrencesBatchCreate
:: Text
-> BatchCreateOccurrencesRequest
-> ProjectsOccurrencesBatchCreate
projectsOccurrencesBatchCreate pPobcParent_ pPobcPayload_ =
ProjectsOccurrencesBatchCreate'
{ _pobcParent = pPobcParent_
, _pobcXgafv = Nothing
, _pobcUploadProtocol = Nothing
, _pobcAccessToken = Nothing
, _pobcUploadType = Nothing
, _pobcPayload = pPobcPayload_
, _pobcCallback = Nothing
}
pobcParent :: Lens' ProjectsOccurrencesBatchCreate Text
pobcParent
= lens _pobcParent (\ s a -> s{_pobcParent = a})
pobcXgafv :: Lens' ProjectsOccurrencesBatchCreate (Maybe Xgafv)
pobcXgafv
= lens _pobcXgafv (\ s a -> s{_pobcXgafv = a})
pobcUploadProtocol :: Lens' ProjectsOccurrencesBatchCreate (Maybe Text)
pobcUploadProtocol
= lens _pobcUploadProtocol
(\ s a -> s{_pobcUploadProtocol = a})
pobcAccessToken :: Lens' ProjectsOccurrencesBatchCreate (Maybe Text)
pobcAccessToken
= lens _pobcAccessToken
(\ s a -> s{_pobcAccessToken = a})
pobcUploadType :: Lens' ProjectsOccurrencesBatchCreate (Maybe Text)
pobcUploadType
= lens _pobcUploadType
(\ s a -> s{_pobcUploadType = a})
pobcPayload :: Lens' ProjectsOccurrencesBatchCreate BatchCreateOccurrencesRequest
pobcPayload
= lens _pobcPayload (\ s a -> s{_pobcPayload = a})
pobcCallback :: Lens' ProjectsOccurrencesBatchCreate (Maybe Text)
pobcCallback
= lens _pobcCallback (\ s a -> s{_pobcCallback = a})
instance GoogleRequest ProjectsOccurrencesBatchCreate
where
type Rs ProjectsOccurrencesBatchCreate =
BatchCreateOccurrencesResponse
type Scopes ProjectsOccurrencesBatchCreate =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsOccurrencesBatchCreate'{..}
= go _pobcParent _pobcXgafv _pobcUploadProtocol
_pobcAccessToken
_pobcUploadType
_pobcCallback
(Just AltJSON)
_pobcPayload
containerAnalysisService
where go
= buildClient
(Proxy ::
Proxy ProjectsOccurrencesBatchCreateResource)
mempty