{-# 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.CloudAsset.Projects.ExportAssets
(
ProjectsExportAssetsResource
, projectsExportAssets
, ProjectsExportAssets
, peaParent
, peaXgafv
, peaUploadProtocol
, peaAccessToken
, peaUploadType
, peaPayload
, peaCallback
) where
import Network.Google.CloudAsset.Types
import Network.Google.Prelude
type ProjectsExportAssetsResource =
"v1beta1" :>
CaptureMode "parent" "exportAssets" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ExportAssetsRequest :>
Post '[JSON] Operation
data ProjectsExportAssets = ProjectsExportAssets'
{ _peaParent :: !Text
, _peaXgafv :: !(Maybe Xgafv)
, _peaUploadProtocol :: !(Maybe Text)
, _peaAccessToken :: !(Maybe Text)
, _peaUploadType :: !(Maybe Text)
, _peaPayload :: !ExportAssetsRequest
, _peaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsExportAssets
:: Text
-> ExportAssetsRequest
-> ProjectsExportAssets
projectsExportAssets pPeaParent_ pPeaPayload_ =
ProjectsExportAssets'
{ _peaParent = pPeaParent_
, _peaXgafv = Nothing
, _peaUploadProtocol = Nothing
, _peaAccessToken = Nothing
, _peaUploadType = Nothing
, _peaPayload = pPeaPayload_
, _peaCallback = Nothing
}
peaParent :: Lens' ProjectsExportAssets Text
peaParent
= lens _peaParent (\ s a -> s{_peaParent = a})
peaXgafv :: Lens' ProjectsExportAssets (Maybe Xgafv)
peaXgafv = lens _peaXgafv (\ s a -> s{_peaXgafv = a})
peaUploadProtocol :: Lens' ProjectsExportAssets (Maybe Text)
peaUploadProtocol
= lens _peaUploadProtocol
(\ s a -> s{_peaUploadProtocol = a})
peaAccessToken :: Lens' ProjectsExportAssets (Maybe Text)
peaAccessToken
= lens _peaAccessToken
(\ s a -> s{_peaAccessToken = a})
peaUploadType :: Lens' ProjectsExportAssets (Maybe Text)
peaUploadType
= lens _peaUploadType
(\ s a -> s{_peaUploadType = a})
peaPayload :: Lens' ProjectsExportAssets ExportAssetsRequest
peaPayload
= lens _peaPayload (\ s a -> s{_peaPayload = a})
peaCallback :: Lens' ProjectsExportAssets (Maybe Text)
peaCallback
= lens _peaCallback (\ s a -> s{_peaCallback = a})
instance GoogleRequest ProjectsExportAssets where
type Rs ProjectsExportAssets = Operation
type Scopes ProjectsExportAssets =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ProjectsExportAssets'{..}
= go _peaParent _peaXgafv _peaUploadProtocol
_peaAccessToken
_peaUploadType
_peaCallback
(Just AltJSON)
_peaPayload
cloudAssetService
where go
= buildClient
(Proxy :: Proxy ProjectsExportAssetsResource)
mempty