{-# 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.Topics.Get
(
CoursesTopicsGetResource
, coursesTopicsGet
, CoursesTopicsGet
, ctgXgafv
, ctgUploadProtocol
, ctgCourseId
, ctgAccessToken
, ctgUploadType
, ctgId
, ctgCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesTopicsGetResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"topics" :>
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] Topic
data CoursesTopicsGet =
CoursesTopicsGet'
{ _ctgXgafv :: !(Maybe Xgafv)
, _ctgUploadProtocol :: !(Maybe Text)
, _ctgCourseId :: !Text
, _ctgAccessToken :: !(Maybe Text)
, _ctgUploadType :: !(Maybe Text)
, _ctgId :: !Text
, _ctgCallback :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
coursesTopicsGet
:: Text
-> Text
-> CoursesTopicsGet
coursesTopicsGet pCtgCourseId_ pCtgId_ =
CoursesTopicsGet'
{ _ctgXgafv = Nothing
, _ctgUploadProtocol = Nothing
, _ctgCourseId = pCtgCourseId_
, _ctgAccessToken = Nothing
, _ctgUploadType = Nothing
, _ctgId = pCtgId_
, _ctgCallback = Nothing
}
ctgXgafv :: Lens' CoursesTopicsGet (Maybe Xgafv)
ctgXgafv = lens _ctgXgafv (\ s a -> s{_ctgXgafv = a})
ctgUploadProtocol :: Lens' CoursesTopicsGet (Maybe Text)
ctgUploadProtocol
= lens _ctgUploadProtocol
(\ s a -> s{_ctgUploadProtocol = a})
ctgCourseId :: Lens' CoursesTopicsGet Text
ctgCourseId
= lens _ctgCourseId (\ s a -> s{_ctgCourseId = a})
ctgAccessToken :: Lens' CoursesTopicsGet (Maybe Text)
ctgAccessToken
= lens _ctgAccessToken
(\ s a -> s{_ctgAccessToken = a})
ctgUploadType :: Lens' CoursesTopicsGet (Maybe Text)
ctgUploadType
= lens _ctgUploadType
(\ s a -> s{_ctgUploadType = a})
ctgId :: Lens' CoursesTopicsGet Text
ctgId = lens _ctgId (\ s a -> s{_ctgId = a})
ctgCallback :: Lens' CoursesTopicsGet (Maybe Text)
ctgCallback
= lens _ctgCallback (\ s a -> s{_ctgCallback = a})
instance GoogleRequest CoursesTopicsGet where
type Rs CoursesTopicsGet = Topic
type Scopes CoursesTopicsGet =
'["https://www.googleapis.com/auth/classroom.topics",
"https://www.googleapis.com/auth/classroom.topics.readonly"]
requestClient CoursesTopicsGet'{..}
= go _ctgCourseId _ctgId _ctgXgafv _ctgUploadProtocol
_ctgAccessToken
_ctgUploadType
_ctgCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesTopicsGetResource)
mempty