{-# 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.Files.GenerateIds
(
FilesGenerateIdsResource
, filesGenerateIds
, FilesGenerateIds
, fgiSpace
, fgiCount
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type FilesGenerateIdsResource =
"drive" :>
"v3" :>
"files" :>
"generateIds" :>
QueryParam "space" Text :>
QueryParam "count" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] GeneratedIds
data FilesGenerateIds = FilesGenerateIds'
{ _fgiSpace :: !Text
, _fgiCount :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
filesGenerateIds
:: FilesGenerateIds
filesGenerateIds =
FilesGenerateIds'
{ _fgiSpace = "drive"
, _fgiCount = 10
}
fgiSpace :: Lens' FilesGenerateIds Text
fgiSpace = lens _fgiSpace (\ s a -> s{_fgiSpace = a})
fgiCount :: Lens' FilesGenerateIds Int32
fgiCount
= lens _fgiCount (\ s a -> s{_fgiCount = a}) .
_Coerce
instance GoogleRequest FilesGenerateIds where
type Rs FilesGenerateIds = GeneratedIds
type Scopes FilesGenerateIds =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"]
requestClient FilesGenerateIds'{..}
= go (Just _fgiSpace) (Just _fgiCount) (Just AltJSON)
driveService
where go
= buildClient
(Proxy :: Proxy FilesGenerateIdsResource)
mempty