{-# 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.Clone
(
InstancesCloneResource
, instancesClone
, InstancesClone
, icProject
, icPayload
, icInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesCloneResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"clone" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesCloneRequest :>
Post '[JSON] Operation
data InstancesClone = InstancesClone'
{ _icProject :: !Text
, _icPayload :: !InstancesCloneRequest
, _icInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesClone
:: Text
-> InstancesCloneRequest
-> Text
-> InstancesClone
instancesClone pIcProject_ pIcPayload_ pIcInstance_ =
InstancesClone'
{ _icProject = pIcProject_
, _icPayload = pIcPayload_
, _icInstance = pIcInstance_
}
icProject :: Lens' InstancesClone Text
icProject
= lens _icProject (\ s a -> s{_icProject = a})
icPayload :: Lens' InstancesClone InstancesCloneRequest
icPayload
= lens _icPayload (\ s a -> s{_icPayload = a})
icInstance :: Lens' InstancesClone Text
icInstance
= lens _icInstance (\ s a -> s{_icInstance = a})
instance GoogleRequest InstancesClone where
type Rs InstancesClone = Operation
type Scopes InstancesClone =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesClone'{..}
= go _icProject _icInstance (Just AltJSON) _icPayload
sQLAdminService
where go
= buildClient (Proxy :: Proxy InstancesCloneResource)
mempty