{-# 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.Drive.Teamdrives.Create
(
TeamdrivesCreateResource
, teamdrivesCreate
, TeamdrivesCreate
, tcRequestId
, tcPayload
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type TeamdrivesCreateResource =
"drive" :>
"v3" :>
"teamdrives" :>
QueryParam "requestId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TeamDrive :> Post '[JSON] TeamDrive
data TeamdrivesCreate = TeamdrivesCreate'
{ _tcRequestId :: !Text
, _tcPayload :: !TeamDrive
} deriving (Eq,Show,Data,Typeable,Generic)
teamdrivesCreate
:: Text
-> TeamDrive
-> TeamdrivesCreate
teamdrivesCreate pTcRequestId_ pTcPayload_ =
TeamdrivesCreate'
{ _tcRequestId = pTcRequestId_
, _tcPayload = pTcPayload_
}
tcRequestId :: Lens' TeamdrivesCreate Text
tcRequestId
= lens _tcRequestId (\ s a -> s{_tcRequestId = a})
tcPayload :: Lens' TeamdrivesCreate TeamDrive
tcPayload
= lens _tcPayload (\ s a -> s{_tcPayload = a})
instance GoogleRequest TeamdrivesCreate where
type Rs TeamdrivesCreate = TeamDrive
type Scopes TeamdrivesCreate =
'["https://www.googleapis.com/auth/drive"]
requestClient TeamdrivesCreate'{..}
= go (Just _tcRequestId) (Just AltJSON) _tcPayload
driveService
where go
= buildClient
(Proxy :: Proxy TeamdrivesCreateResource)
mempty