{-# 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.RotateServerCa
(
InstancesRotateServerCaResource
, instancesRotateServerCa
, InstancesRotateServerCa
, iProject
, iPayload
, iInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesRotateServerCaResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"rotateServerCa" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] InstancesRotateServerCaRequest :>
Post '[JSON] Operation
data InstancesRotateServerCa = InstancesRotateServerCa'
{ _iProject :: !Text
, _iPayload :: !InstancesRotateServerCaRequest
, _iInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesRotateServerCa
:: Text
-> InstancesRotateServerCaRequest
-> Text
-> InstancesRotateServerCa
instancesRotateServerCa pIProject_ pIPayload_ pIInstance_ =
InstancesRotateServerCa'
{ _iProject = pIProject_
, _iPayload = pIPayload_
, _iInstance = pIInstance_
}
iProject :: Lens' InstancesRotateServerCa Text
iProject = lens _iProject (\ s a -> s{_iProject = a})
iPayload :: Lens' InstancesRotateServerCa InstancesRotateServerCaRequest
iPayload = lens _iPayload (\ s a -> s{_iPayload = a})
iInstance :: Lens' InstancesRotateServerCa Text
iInstance
= lens _iInstance (\ s a -> s{_iInstance = a})
instance GoogleRequest InstancesRotateServerCa where
type Rs InstancesRotateServerCa = Operation
type Scopes InstancesRotateServerCa =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesRotateServerCa'{..}
= go _iProject _iInstance (Just AltJSON) _iPayload
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesRotateServerCaResource)
mempty