{-# 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.Slides.Presentations.Create
(
PresentationsCreateResource
, presentationsCreate
, PresentationsCreate
, pcXgafv
, pcUploadProtocol
, pcAccessToken
, pcUploadType
, pcPayload
, pcCallback
) where
import Network.Google.Prelude
import Network.Google.Slides.Types
type PresentationsCreateResource =
"v1" :>
"presentations" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Presentation :>
Post '[JSON] Presentation
data PresentationsCreate = PresentationsCreate'
{ _pcXgafv :: !(Maybe Xgafv)
, _pcUploadProtocol :: !(Maybe Text)
, _pcAccessToken :: !(Maybe Text)
, _pcUploadType :: !(Maybe Text)
, _pcPayload :: !Presentation
, _pcCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
presentationsCreate
:: Presentation
-> PresentationsCreate
presentationsCreate pPcPayload_ =
PresentationsCreate'
{ _pcXgafv = Nothing
, _pcUploadProtocol = Nothing
, _pcAccessToken = Nothing
, _pcUploadType = Nothing
, _pcPayload = pPcPayload_
, _pcCallback = Nothing
}
pcXgafv :: Lens' PresentationsCreate (Maybe Xgafv)
pcXgafv = lens _pcXgafv (\ s a -> s{_pcXgafv = a})
pcUploadProtocol :: Lens' PresentationsCreate (Maybe Text)
pcUploadProtocol
= lens _pcUploadProtocol
(\ s a -> s{_pcUploadProtocol = a})
pcAccessToken :: Lens' PresentationsCreate (Maybe Text)
pcAccessToken
= lens _pcAccessToken
(\ s a -> s{_pcAccessToken = a})
pcUploadType :: Lens' PresentationsCreate (Maybe Text)
pcUploadType
= lens _pcUploadType (\ s a -> s{_pcUploadType = a})
pcPayload :: Lens' PresentationsCreate Presentation
pcPayload
= lens _pcPayload (\ s a -> s{_pcPayload = a})
pcCallback :: Lens' PresentationsCreate (Maybe Text)
pcCallback
= lens _pcCallback (\ s a -> s{_pcCallback = a})
instance GoogleRequest PresentationsCreate where
type Rs PresentationsCreate = Presentation
type Scopes PresentationsCreate =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/presentations"]
requestClient PresentationsCreate'{..}
= go _pcXgafv _pcUploadProtocol _pcAccessToken
_pcUploadType
_pcCallback
(Just AltJSON)
_pcPayload
slidesService
where go
= buildClient
(Proxy :: Proxy PresentationsCreateResource)
mempty