{-# 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.Users.Update
(
UsersUpdateResource
, usersUpdate
, UsersUpdate
, uuProject
, uuPayload
, uuName
, uuHost
, uuInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type UsersUpdateResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"users" :>
QueryParam "name" Text :>
QueryParam "host" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] User :> Put '[JSON] Operation
data UsersUpdate = UsersUpdate'
{ _uuProject :: !Text
, _uuPayload :: !User
, _uuName :: !Text
, _uuHost :: !(Maybe Text)
, _uuInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
usersUpdate
:: Text
-> User
-> Text
-> Text
-> UsersUpdate
usersUpdate pUuProject_ pUuPayload_ pUuName_ pUuInstance_ =
UsersUpdate'
{ _uuProject = pUuProject_
, _uuPayload = pUuPayload_
, _uuName = pUuName_
, _uuHost = Nothing
, _uuInstance = pUuInstance_
}
uuProject :: Lens' UsersUpdate Text
uuProject
= lens _uuProject (\ s a -> s{_uuProject = a})
uuPayload :: Lens' UsersUpdate User
uuPayload
= lens _uuPayload (\ s a -> s{_uuPayload = a})
uuName :: Lens' UsersUpdate Text
uuName = lens _uuName (\ s a -> s{_uuName = a})
uuHost :: Lens' UsersUpdate (Maybe Text)
uuHost = lens _uuHost (\ s a -> s{_uuHost = a})
uuInstance :: Lens' UsersUpdate Text
uuInstance
= lens _uuInstance (\ s a -> s{_uuInstance = a})
instance GoogleRequest UsersUpdate where
type Rs UsersUpdate = Operation
type Scopes UsersUpdate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient UsersUpdate'{..}
= go _uuProject _uuInstance (Just _uuName) _uuHost
(Just AltJSON)
_uuPayload
sQLAdminService
where go
= buildClient (Proxy :: Proxy UsersUpdateResource)
mempty