{-# 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.Compute.SSLCertificates.Insert
(
SSLCertificatesInsertResource
, sslCertificatesInsert
, SSLCertificatesInsert
, sciRequestId
, sciProject
, sciPayload
) where
import Network.Google.Compute.Types
import Network.Google.Prelude
type SSLCertificatesInsertResource =
"compute" :>
"v1" :>
"projects" :>
Capture "project" Text :>
"global" :>
"sslCertificates" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] SSLCertificate :>
Post '[JSON] Operation
data SSLCertificatesInsert = SSLCertificatesInsert'
{ _sciRequestId :: !(Maybe Text)
, _sciProject :: !Text
, _sciPayload :: !SSLCertificate
} deriving (Eq,Show,Data,Typeable,Generic)
sslCertificatesInsert
:: Text
-> SSLCertificate
-> SSLCertificatesInsert
sslCertificatesInsert pSciProject_ pSciPayload_ =
SSLCertificatesInsert'
{ _sciRequestId = Nothing
, _sciProject = pSciProject_
, _sciPayload = pSciPayload_
}
sciRequestId :: Lens' SSLCertificatesInsert (Maybe Text)
sciRequestId
= lens _sciRequestId (\ s a -> s{_sciRequestId = a})
sciProject :: Lens' SSLCertificatesInsert Text
sciProject
= lens _sciProject (\ s a -> s{_sciProject = a})
sciPayload :: Lens' SSLCertificatesInsert SSLCertificate
sciPayload
= lens _sciPayload (\ s a -> s{_sciPayload = a})
instance GoogleRequest SSLCertificatesInsert where
type Rs SSLCertificatesInsert = Operation
type Scopes SSLCertificatesInsert =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/compute"]
requestClient SSLCertificatesInsert'{..}
= go _sciProject _sciRequestId (Just AltJSON)
_sciPayload
computeService
where go
= buildClient
(Proxy :: Proxy SSLCertificatesInsertResource)
mempty