{-# 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.Announcements.Get
(
CoursesAnnouncementsGetResource
, coursesAnnouncementsGet
, CoursesAnnouncementsGet
, cagXgafv
, cagUploadProtocol
, cagCourseId
, cagAccessToken
, cagUploadType
, cagId
, cagCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesAnnouncementsGetResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"announcements" :>
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] Announcement
data CoursesAnnouncementsGet = CoursesAnnouncementsGet'
{ _cagXgafv :: !(Maybe Xgafv)
, _cagUploadProtocol :: !(Maybe Text)
, _cagCourseId :: !Text
, _cagAccessToken :: !(Maybe Text)
, _cagUploadType :: !(Maybe Text)
, _cagId :: !Text
, _cagCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesAnnouncementsGet
:: Text
-> Text
-> CoursesAnnouncementsGet
coursesAnnouncementsGet pCagCourseId_ pCagId_ =
CoursesAnnouncementsGet'
{ _cagXgafv = Nothing
, _cagUploadProtocol = Nothing
, _cagCourseId = pCagCourseId_
, _cagAccessToken = Nothing
, _cagUploadType = Nothing
, _cagId = pCagId_
, _cagCallback = Nothing
}
cagXgafv :: Lens' CoursesAnnouncementsGet (Maybe Xgafv)
cagXgafv = lens _cagXgafv (\ s a -> s{_cagXgafv = a})
cagUploadProtocol :: Lens' CoursesAnnouncementsGet (Maybe Text)
cagUploadProtocol
= lens _cagUploadProtocol
(\ s a -> s{_cagUploadProtocol = a})
cagCourseId :: Lens' CoursesAnnouncementsGet Text
cagCourseId
= lens _cagCourseId (\ s a -> s{_cagCourseId = a})
cagAccessToken :: Lens' CoursesAnnouncementsGet (Maybe Text)
cagAccessToken
= lens _cagAccessToken
(\ s a -> s{_cagAccessToken = a})
cagUploadType :: Lens' CoursesAnnouncementsGet (Maybe Text)
cagUploadType
= lens _cagUploadType
(\ s a -> s{_cagUploadType = a})
cagId :: Lens' CoursesAnnouncementsGet Text
cagId = lens _cagId (\ s a -> s{_cagId = a})
cagCallback :: Lens' CoursesAnnouncementsGet (Maybe Text)
cagCallback
= lens _cagCallback (\ s a -> s{_cagCallback = a})
instance GoogleRequest CoursesAnnouncementsGet where
type Rs CoursesAnnouncementsGet = Announcement
type Scopes CoursesAnnouncementsGet =
'["https://www.googleapis.com/auth/classroom.announcements",
"https://www.googleapis.com/auth/classroom.announcements.readonly"]
requestClient CoursesAnnouncementsGet'{..}
= go _cagCourseId _cagId _cagXgafv _cagUploadProtocol
_cagAccessToken
_cagUploadType
_cagCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesAnnouncementsGetResource)
mempty