{-# 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.Import
(
InstancesImportResource
, instancesImport
, InstancesImport
, iiProject
, iiPayload
, iiInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesImportResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"import" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesImportRequest :>
Post '[JSON] Operation
data InstancesImport = InstancesImport'
{ _iiProject :: !Text
, _iiPayload :: !InstancesImportRequest
, _iiInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesImport
:: Text
-> InstancesImportRequest
-> Text
-> InstancesImport
instancesImport pIiProject_ pIiPayload_ pIiInstance_ =
InstancesImport'
{ _iiProject = pIiProject_
, _iiPayload = pIiPayload_
, _iiInstance = pIiInstance_
}
iiProject :: Lens' InstancesImport Text
iiProject
= lens _iiProject (\ s a -> s{_iiProject = a})
iiPayload :: Lens' InstancesImport InstancesImportRequest
iiPayload
= lens _iiPayload (\ s a -> s{_iiPayload = a})
iiInstance :: Lens' InstancesImport Text
iiInstance
= lens _iiInstance (\ s a -> s{_iiInstance = a})
instance GoogleRequest InstancesImport where
type Rs InstancesImport = Operation
type Scopes InstancesImport =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient InstancesImport'{..}
= go _iiProject _iiInstance (Just AltJSON) _iiPayload
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesImportResource)
mempty