{-# 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.SSLCerts.Insert
(
SSLCertsInsertResource
, sslCertsInsert
, SSLCertsInsert
, sciProject
, sciPayload
, sciInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type SSLCertsInsertResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"sslCerts" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SSLCertsInsertRequest :>
Post '[JSON] SSLCertsInsertResponse
data SSLCertsInsert = SSLCertsInsert'
{ _sciProject :: !Text
, _sciPayload :: !SSLCertsInsertRequest
, _sciInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
sslCertsInsert
:: Text
-> SSLCertsInsertRequest
-> Text
-> SSLCertsInsert
sslCertsInsert pSciProject_ pSciPayload_ pSciInstance_ =
SSLCertsInsert'
{ _sciProject = pSciProject_
, _sciPayload = pSciPayload_
, _sciInstance = pSciInstance_
}
sciProject :: Lens' SSLCertsInsert Text
sciProject
= lens _sciProject (\ s a -> s{_sciProject = a})
sciPayload :: Lens' SSLCertsInsert SSLCertsInsertRequest
sciPayload
= lens _sciPayload (\ s a -> s{_sciPayload = a})
sciInstance :: Lens' SSLCertsInsert Text
sciInstance
= lens _sciInstance (\ s a -> s{_sciInstance = a})
instance GoogleRequest SSLCertsInsert where
type Rs SSLCertsInsert = SSLCertsInsertResponse
type Scopes SSLCertsInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient SSLCertsInsert'{..}
= go _sciProject _sciInstance (Just AltJSON)
_sciPayload
sQLAdminService
where go
= buildClient (Proxy :: Proxy SSLCertsInsertResource)
mempty