{-# 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.Update
(
InstancesUpdateResource
, instancesUpdate
, InstancesUpdate
, iuProject
, iuPayload
, iuInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesUpdateResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DatabaseInstance :>
Put '[JSON] Operation
data InstancesUpdate = InstancesUpdate'
{ _iuProject :: !Text
, _iuPayload :: !DatabaseInstance
, _iuInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesUpdate
:: Text
-> DatabaseInstance
-> Text
-> InstancesUpdate
instancesUpdate pIuProject_ pIuPayload_ pIuInstance_ =
InstancesUpdate'
{ _iuProject = pIuProject_
, _iuPayload = pIuPayload_
, _iuInstance = pIuInstance_
}
iuProject :: Lens' InstancesUpdate Text
iuProject
= lens _iuProject (\ s a -> s{_iuProject = a})
iuPayload :: Lens' InstancesUpdate DatabaseInstance
iuPayload
= lens _iuPayload (\ s a -> s{_iuPayload = a})
iuInstance :: Lens' InstancesUpdate Text
iuInstance
= lens _iuInstance (\ s a -> s{_iuInstance = a})
instance GoogleRequest InstancesUpdate where
type Rs InstancesUpdate = Operation
type Scopes InstancesUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesUpdate'{..}
= go _iuProject _iuInstance (Just AltJSON) _iuPayload
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesUpdateResource)
mempty