{-# 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.Restart
(
InstancesRestartResource
, instancesRestart
, InstancesRestart
, irProject
, irInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesRestartResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"restart" :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data InstancesRestart = InstancesRestart'
{ _irProject :: !Text
, _irInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesRestart
:: Text
-> Text
-> InstancesRestart
instancesRestart pIrProject_ pIrInstance_ =
InstancesRestart'
{ _irProject = pIrProject_
, _irInstance = pIrInstance_
}
irProject :: Lens' InstancesRestart Text
irProject
= lens _irProject (\ s a -> s{_irProject = a})
irInstance :: Lens' InstancesRestart Text
irInstance
= lens _irInstance (\ s a -> s{_irInstance = a})
instance GoogleRequest InstancesRestart where
type Rs InstancesRestart = Operation
type Scopes InstancesRestart =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesRestart'{..}
= go _irProject _irInstance (Just AltJSON)
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesRestartResource)
mempty