{-# 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.CreateEphemeral
(
SSLCertsCreateEphemeralResource
, sslCertsCreateEphemeral
, SSLCertsCreateEphemeral
, scceProject
, sccePayload
, scceInstance
) where
import Network.Google.Prelude
import Network.Google.SQLAdmin.Types
type SSLCertsCreateEphemeralResource =
"sql" :>
"v1beta4" :>
"projects" :>
Capture "project" Text :>
"instances" :>
Capture "instance" Text :>
"createEphemeral" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SSLCertsCreateEphemeralRequest :>
Post '[JSON] SSLCert
data SSLCertsCreateEphemeral = SSLCertsCreateEphemeral'
{ _scceProject :: !Text
, _sccePayload :: !SSLCertsCreateEphemeralRequest
, _scceInstance :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
sslCertsCreateEphemeral
:: Text
-> SSLCertsCreateEphemeralRequest
-> Text
-> SSLCertsCreateEphemeral
sslCertsCreateEphemeral pScceProject_ pSccePayload_ pScceInstance_ =
SSLCertsCreateEphemeral'
{ _scceProject = pScceProject_
, _sccePayload = pSccePayload_
, _scceInstance = pScceInstance_
}
scceProject :: Lens' SSLCertsCreateEphemeral Text
scceProject
= lens _scceProject (\ s a -> s{_scceProject = a})
sccePayload :: Lens' SSLCertsCreateEphemeral SSLCertsCreateEphemeralRequest
sccePayload
= lens _sccePayload (\ s a -> s{_sccePayload = a})
scceInstance :: Lens' SSLCertsCreateEphemeral Text
scceInstance
= lens _scceInstance (\ s a -> s{_scceInstance = a})
instance GoogleRequest SSLCertsCreateEphemeral where
type Rs SSLCertsCreateEphemeral = SSLCert
type Scopes SSLCertsCreateEphemeral =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/sqlservice.admin"]
requestClient SSLCertsCreateEphemeral'{..}
= go _scceProject _scceInstance (Just AltJSON)
_sccePayload
sQLAdminService
where go
= buildClient
(Proxy :: Proxy SSLCertsCreateEphemeralResource)
mempty