{-# 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.Databases.Update
(
DatabasesUpdateResource
, databasesUpdate
, DatabasesUpdate
, duProject
, duDatabase
, duPayload
, duInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type DatabasesUpdateResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"databases" :>
Capture "database" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Database :> Put '[JSON] Operation
data DatabasesUpdate = DatabasesUpdate'
{ _duProject :: !Text
, _duDatabase :: !Text
, _duPayload :: !Database
, _duInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
databasesUpdate
:: Text
-> Text
-> Database
-> Text
-> DatabasesUpdate
databasesUpdate pDuProject_ pDuDatabase_ pDuPayload_ pDuInstance_ =
DatabasesUpdate'
{ _duProject = pDuProject_
, _duDatabase = pDuDatabase_
, _duPayload = pDuPayload_
, _duInstance = pDuInstance_
}
duProject :: Lens' DatabasesUpdate Text
duProject
= lens _duProject (\ s a -> s{_duProject = a})
duDatabase :: Lens' DatabasesUpdate Text
duDatabase
= lens _duDatabase (\ s a -> s{_duDatabase = a})
duPayload :: Lens' DatabasesUpdate Database
duPayload
= lens _duPayload (\ s a -> s{_duPayload = a})
duInstance :: Lens' DatabasesUpdate Text
duInstance
= lens _duInstance (\ s a -> s{_duInstance = a})
instance GoogleRequest DatabasesUpdate where
type Rs DatabasesUpdate = Operation
type Scopes DatabasesUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient DatabasesUpdate'{..}
= go _duProject _duInstance _duDatabase
(Just AltJSON)
_duPayload
sQLAdminService
where go
= buildClient
(Proxy :: Proxy DatabasesUpdateResource)
mempty