{-# 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.TruncateLog
(
InstancesTruncateLogResource
, instancesTruncateLog
, InstancesTruncateLog
, itlProject
, itlPayload
, itlInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesTruncateLogResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"truncateLog" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesTruncateLogRequest :>
Post '[JSON] Operation
data InstancesTruncateLog = InstancesTruncateLog'
{ _itlProject :: !Text
, _itlPayload :: !InstancesTruncateLogRequest
, _itlInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesTruncateLog
:: Text
-> InstancesTruncateLogRequest
-> Text
-> InstancesTruncateLog
instancesTruncateLog pItlProject_ pItlPayload_ pItlInstance_ =
InstancesTruncateLog'
{ _itlProject = pItlProject_
, _itlPayload = pItlPayload_
, _itlInstance = pItlInstance_
}
itlProject :: Lens' InstancesTruncateLog Text
itlProject
= lens _itlProject (\ s a -> s{_itlProject = a})
itlPayload :: Lens' InstancesTruncateLog InstancesTruncateLogRequest
itlPayload
= lens _itlPayload (\ s a -> s{_itlPayload = a})
itlInstance :: Lens' InstancesTruncateLog Text
itlInstance
= lens _itlInstance (\ s a -> s{_itlInstance = a})
instance GoogleRequest InstancesTruncateLog where
type Rs InstancesTruncateLog = Operation
type Scopes InstancesTruncateLog =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesTruncateLog'{..}
= go _itlProject _itlInstance (Just AltJSON)
_itlPayload
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesTruncateLogResource)
mempty