{-# 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.SQL.Instances.Export
(
InstancesExportResource
, instancesExport
, InstancesExport
, ieProject
, iePayload
, ieInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesExportResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"export" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesExportRequest :>
Post '[JSON] Operation
data InstancesExport = InstancesExport'
{ _ieProject :: !Text
, _iePayload :: !InstancesExportRequest
, _ieInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesExport
:: Text
-> InstancesExportRequest
-> Text
-> InstancesExport
instancesExport pIeProject_ pIePayload_ pIeInstance_ =
InstancesExport'
{ _ieProject = pIeProject_
, _iePayload = pIePayload_
, _ieInstance = pIeInstance_
}
ieProject :: Lens' InstancesExport Text
ieProject
= lens _ieProject (\ s a -> s{_ieProject = a})
iePayload :: Lens' InstancesExport InstancesExportRequest
iePayload
= lens _iePayload (\ s a -> s{_iePayload = a})
ieInstance :: Lens' InstancesExport Text
ieInstance
= lens _ieInstance (\ s a -> s{_ieInstance = a})
instance GoogleRequest InstancesExport where
type Rs InstancesExport = Operation
type Scopes InstancesExport =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient InstancesExport'{..}
= go _ieProject _ieInstance (Just AltJSON) _iePayload
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesExportResource)
mempty