{-# 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.Organizations.ExportAssets
(
OrganizationsExportAssetsResource
, organizationsExportAssets
, OrganizationsExportAssets
, oeaParent
, oeaXgafv
, oeaUploadProtocol
, oeaAccessToken
, oeaUploadType
, oeaPayload
, oeaCallback
) where
import Network.Google.CloudAsset.Types
import Network.Google.Prelude
type OrganizationsExportAssetsResource =
"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 OrganizationsExportAssets = OrganizationsExportAssets'
{ _oeaParent :: !Text
, _oeaXgafv :: !(Maybe Xgafv)
, _oeaUploadProtocol :: !(Maybe Text)
, _oeaAccessToken :: !(Maybe Text)
, _oeaUploadType :: !(Maybe Text)
, _oeaPayload :: !ExportAssetsRequest
, _oeaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
organizationsExportAssets
:: Text
-> ExportAssetsRequest
-> OrganizationsExportAssets
organizationsExportAssets pOeaParent_ pOeaPayload_ =
OrganizationsExportAssets'
{ _oeaParent = pOeaParent_
, _oeaXgafv = Nothing
, _oeaUploadProtocol = Nothing
, _oeaAccessToken = Nothing
, _oeaUploadType = Nothing
, _oeaPayload = pOeaPayload_
, _oeaCallback = Nothing
}
oeaParent :: Lens' OrganizationsExportAssets Text
oeaParent
= lens _oeaParent (\ s a -> s{_oeaParent = a})
oeaXgafv :: Lens' OrganizationsExportAssets (Maybe Xgafv)
oeaXgafv = lens _oeaXgafv (\ s a -> s{_oeaXgafv = a})
oeaUploadProtocol :: Lens' OrganizationsExportAssets (Maybe Text)
oeaUploadProtocol
= lens _oeaUploadProtocol
(\ s a -> s{_oeaUploadProtocol = a})
oeaAccessToken :: Lens' OrganizationsExportAssets (Maybe Text)
oeaAccessToken
= lens _oeaAccessToken
(\ s a -> s{_oeaAccessToken = a})
oeaUploadType :: Lens' OrganizationsExportAssets (Maybe Text)
oeaUploadType
= lens _oeaUploadType
(\ s a -> s{_oeaUploadType = a})
oeaPayload :: Lens' OrganizationsExportAssets ExportAssetsRequest
oeaPayload
= lens _oeaPayload (\ s a -> s{_oeaPayload = a})
oeaCallback :: Lens' OrganizationsExportAssets (Maybe Text)
oeaCallback
= lens _oeaCallback (\ s a -> s{_oeaCallback = a})
instance GoogleRequest OrganizationsExportAssets
where
type Rs OrganizationsExportAssets = Operation
type Scopes OrganizationsExportAssets =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient OrganizationsExportAssets'{..}
= go _oeaParent _oeaXgafv _oeaUploadProtocol
_oeaAccessToken
_oeaUploadType
_oeaCallback
(Just AltJSON)
_oeaPayload
cloudAssetService
where go
= buildClient
(Proxy :: Proxy OrganizationsExportAssetsResource)
mempty