{-# 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.ExportAssets
(
ExportAssetsResource
, exportAssets
, ExportAssets
, eaParent
, eaXgafv
, eaUploadProtocol
, eaAccessToken
, eaUploadType
, eaPayload
, eaCallback
) where
import Network.Google.CloudAsset.Types
import Network.Google.Prelude
type ExportAssetsResource =
"v1" :>
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 ExportAssets =
ExportAssets'
{ _eaParent :: !Text
, _eaXgafv :: !(Maybe Xgafv)
, _eaUploadProtocol :: !(Maybe Text)
, _eaAccessToken :: !(Maybe Text)
, _eaUploadType :: !(Maybe Text)
, _eaPayload :: !ExportAssetsRequest
, _eaCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
exportAssets
:: Text
-> ExportAssetsRequest
-> ExportAssets
exportAssets pEaParent_ pEaPayload_ =
ExportAssets'
{ _eaParent = pEaParent_
, _eaXgafv = Nothing
, _eaUploadProtocol = Nothing
, _eaAccessToken = Nothing
, _eaUploadType = Nothing
, _eaPayload = pEaPayload_
, _eaCallback = Nothing
}
eaParent :: Lens' ExportAssets Text
eaParent = lens _eaParent (\ s a -> s{_eaParent = a})
eaXgafv :: Lens' ExportAssets (Maybe Xgafv)
eaXgafv = lens _eaXgafv (\ s a -> s{_eaXgafv = a})
eaUploadProtocol :: Lens' ExportAssets (Maybe Text)
eaUploadProtocol
= lens _eaUploadProtocol
(\ s a -> s{_eaUploadProtocol = a})
eaAccessToken :: Lens' ExportAssets (Maybe Text)
eaAccessToken
= lens _eaAccessToken
(\ s a -> s{_eaAccessToken = a})
eaUploadType :: Lens' ExportAssets (Maybe Text)
eaUploadType
= lens _eaUploadType (\ s a -> s{_eaUploadType = a})
eaPayload :: Lens' ExportAssets ExportAssetsRequest
eaPayload
= lens _eaPayload (\ s a -> s{_eaPayload = a})
eaCallback :: Lens' ExportAssets (Maybe Text)
eaCallback
= lens _eaCallback (\ s a -> s{_eaCallback = a})
instance GoogleRequest ExportAssets where
type Rs ExportAssets = Operation
type Scopes ExportAssets =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ExportAssets'{..}
= go _eaParent _eaXgafv _eaUploadProtocol
_eaAccessToken
_eaUploadType
_eaCallback
(Just AltJSON)
_eaPayload
cloudAssetService
where go
= buildClient (Proxy :: Proxy ExportAssetsResource)
mempty