{-# 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.Patch
(
InstancesPatchResource
, instancesPatch
, InstancesPatch
, ipProject
, ipPayload
, ipInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesPatchResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DatabaseInstance :>
Patch '[JSON] Operation
data InstancesPatch = InstancesPatch'
{ _ipProject :: !Text
, _ipPayload :: !DatabaseInstance
, _ipInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesPatch
:: Text
-> DatabaseInstance
-> Text
-> InstancesPatch
instancesPatch pIpProject_ pIpPayload_ pIpInstance_ =
InstancesPatch'
{ _ipProject = pIpProject_
, _ipPayload = pIpPayload_
, _ipInstance = pIpInstance_
}
ipProject :: Lens' InstancesPatch Text
ipProject
= lens _ipProject (\ s a -> s{_ipProject = a})
ipPayload :: Lens' InstancesPatch DatabaseInstance
ipPayload
= lens _ipPayload (\ s a -> s{_ipPayload = a})
ipInstance :: Lens' InstancesPatch Text
ipInstance
= lens _ipInstance (\ s a -> s{_ipInstance = a})
instance GoogleRequest InstancesPatch where
type Rs InstancesPatch = Operation
type Scopes InstancesPatch =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesPatch'{..}
= go _ipProject _ipInstance (Just AltJSON) _ipPayload
sQLAdminService
where go
= buildClient (Proxy :: Proxy InstancesPatchResource)
mempty