{-# 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.Classroom.Courses.Get
(
CoursesGetResource
, coursesGet
, CoursesGet
, cgXgafv
, cgUploadProtocol
, cgAccessToken
, cgUploadType
, cgId
, cgCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesGetResource =
"v1" :>
"courses" :>
Capture "id" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Course
data CoursesGet = CoursesGet'
{ _cgXgafv :: !(Maybe Xgafv)
, _cgUploadProtocol :: !(Maybe Text)
, _cgAccessToken :: !(Maybe Text)
, _cgUploadType :: !(Maybe Text)
, _cgId :: !Text
, _cgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesGet
:: Text
-> CoursesGet
coursesGet pCgId_ =
CoursesGet'
{ _cgXgafv = Nothing
, _cgUploadProtocol = Nothing
, _cgAccessToken = Nothing
, _cgUploadType = Nothing
, _cgId = pCgId_
, _cgCallback = Nothing
}
cgXgafv :: Lens' CoursesGet (Maybe Xgafv)
cgXgafv = lens _cgXgafv (\ s a -> s{_cgXgafv = a})
cgUploadProtocol :: Lens' CoursesGet (Maybe Text)
cgUploadProtocol
= lens _cgUploadProtocol
(\ s a -> s{_cgUploadProtocol = a})
cgAccessToken :: Lens' CoursesGet (Maybe Text)
cgAccessToken
= lens _cgAccessToken
(\ s a -> s{_cgAccessToken = a})
cgUploadType :: Lens' CoursesGet (Maybe Text)
cgUploadType
= lens _cgUploadType (\ s a -> s{_cgUploadType = a})
cgId :: Lens' CoursesGet Text
cgId = lens _cgId (\ s a -> s{_cgId = a})
cgCallback :: Lens' CoursesGet (Maybe Text)
cgCallback
= lens _cgCallback (\ s a -> s{_cgCallback = a})
instance GoogleRequest CoursesGet where
type Rs CoursesGet = Course
type Scopes CoursesGet =
'["https://www.googleapis.com/auth/classroom.courses",
"https://www.googleapis.com/auth/classroom.courses.readonly"]
requestClient CoursesGet'{..}
= go _cgId _cgXgafv _cgUploadProtocol _cgAccessToken
_cgUploadType
_cgCallback
(Just AltJSON)
classroomService
where go
= buildClient (Proxy :: Proxy CoursesGetResource)
mempty