{-# 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.List
(
CoursesAnnouncementsListResource
, coursesAnnouncementsList
, CoursesAnnouncementsList
, calXgafv
, calUploadProtocol
, calOrderBy
, calAnnouncementStates
, calCourseId
, calAccessToken
, calUploadType
, calPageToken
, calPageSize
, calCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesAnnouncementsListResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"announcements" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "orderBy" Text :>
QueryParams "announcementStates" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListAnnouncementsResponse
data CoursesAnnouncementsList = CoursesAnnouncementsList'
{ _calXgafv :: !(Maybe Xgafv)
, _calUploadProtocol :: !(Maybe Text)
, _calOrderBy :: !(Maybe Text)
, _calAnnouncementStates :: !(Maybe [Text])
, _calCourseId :: !Text
, _calAccessToken :: !(Maybe Text)
, _calUploadType :: !(Maybe Text)
, _calPageToken :: !(Maybe Text)
, _calPageSize :: !(Maybe (Textual Int32))
, _calCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesAnnouncementsList
:: Text
-> CoursesAnnouncementsList
coursesAnnouncementsList pCalCourseId_ =
CoursesAnnouncementsList'
{ _calXgafv = Nothing
, _calUploadProtocol = Nothing
, _calOrderBy = Nothing
, _calAnnouncementStates = Nothing
, _calCourseId = pCalCourseId_
, _calAccessToken = Nothing
, _calUploadType = Nothing
, _calPageToken = Nothing
, _calPageSize = Nothing
, _calCallback = Nothing
}
calXgafv :: Lens' CoursesAnnouncementsList (Maybe Xgafv)
calXgafv = lens _calXgafv (\ s a -> s{_calXgafv = a})
calUploadProtocol :: Lens' CoursesAnnouncementsList (Maybe Text)
calUploadProtocol
= lens _calUploadProtocol
(\ s a -> s{_calUploadProtocol = a})
calOrderBy :: Lens' CoursesAnnouncementsList (Maybe Text)
calOrderBy
= lens _calOrderBy (\ s a -> s{_calOrderBy = a})
calAnnouncementStates :: Lens' CoursesAnnouncementsList [Text]
calAnnouncementStates
= lens _calAnnouncementStates
(\ s a -> s{_calAnnouncementStates = a})
. _Default
. _Coerce
calCourseId :: Lens' CoursesAnnouncementsList Text
calCourseId
= lens _calCourseId (\ s a -> s{_calCourseId = a})
calAccessToken :: Lens' CoursesAnnouncementsList (Maybe Text)
calAccessToken
= lens _calAccessToken
(\ s a -> s{_calAccessToken = a})
calUploadType :: Lens' CoursesAnnouncementsList (Maybe Text)
calUploadType
= lens _calUploadType
(\ s a -> s{_calUploadType = a})
calPageToken :: Lens' CoursesAnnouncementsList (Maybe Text)
calPageToken
= lens _calPageToken (\ s a -> s{_calPageToken = a})
calPageSize :: Lens' CoursesAnnouncementsList (Maybe Int32)
calPageSize
= lens _calPageSize (\ s a -> s{_calPageSize = a}) .
mapping _Coerce
calCallback :: Lens' CoursesAnnouncementsList (Maybe Text)
calCallback
= lens _calCallback (\ s a -> s{_calCallback = a})
instance GoogleRequest CoursesAnnouncementsList where
type Rs CoursesAnnouncementsList =
ListAnnouncementsResponse
type Scopes CoursesAnnouncementsList =
'["https://www.googleapis.com/auth/classroom.announcements",
"https://www.googleapis.com/auth/classroom.announcements.readonly"]
requestClient CoursesAnnouncementsList'{..}
= go _calCourseId _calXgafv _calUploadProtocol
_calOrderBy
(_calAnnouncementStates ^. _Default)
_calAccessToken
_calUploadType
_calPageToken
_calPageSize
_calCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesAnnouncementsListResource)
mempty