{-# 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.AddServerCa
(
InstancesAddServerCaResource
, instancesAddServerCa
, InstancesAddServerCa
, iascProject
, iascInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type InstancesAddServerCaResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"addServerCa" :>
QueryParam "alt" AltJSON :> Post '[JSON] Operation
data InstancesAddServerCa = InstancesAddServerCa'
{ _iascProject :: !Text
, _iascInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
instancesAddServerCa
:: Text
-> Text
-> InstancesAddServerCa
instancesAddServerCa pIascProject_ pIascInstance_ =
InstancesAddServerCa'
{ _iascProject = pIascProject_
, _iascInstance = pIascInstance_
}
iascProject :: Lens' InstancesAddServerCa Text
iascProject
= lens _iascProject (\ s a -> s{_iascProject = a})
iascInstance :: Lens' InstancesAddServerCa Text
iascInstance
= lens _iascInstance (\ s a -> s{_iascInstance = a})
instance GoogleRequest InstancesAddServerCa where
type Rs InstancesAddServerCa = Operation
type Scopes InstancesAddServerCa =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient InstancesAddServerCa'{..}
= go _iascProject _iascInstance (Just AltJSON)
sQLAdminService
where go
= buildClient
(Proxy :: Proxy InstancesAddServerCaResource)
mempty