{-# 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.Patch
(
CoursesAnnouncementsPatchResource
, coursesAnnouncementsPatch
, CoursesAnnouncementsPatch
, capXgafv
, capUploadProtocol
, capUpdateMask
, capCourseId
, capAccessToken
, capUploadType
, capPayload
, capId
, capCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesAnnouncementsPatchResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"announcements" :>
Capture "id" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "updateMask" GFieldMask :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Announcement :>
Patch '[JSON] Announcement
data CoursesAnnouncementsPatch = CoursesAnnouncementsPatch'
{ _capXgafv :: !(Maybe Xgafv)
, _capUploadProtocol :: !(Maybe Text)
, _capUpdateMask :: !(Maybe GFieldMask)
, _capCourseId :: !Text
, _capAccessToken :: !(Maybe Text)
, _capUploadType :: !(Maybe Text)
, _capPayload :: !Announcement
, _capId :: !Text
, _capCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesAnnouncementsPatch
:: Text
-> Announcement
-> Text
-> CoursesAnnouncementsPatch
coursesAnnouncementsPatch pCapCourseId_ pCapPayload_ pCapId_ =
CoursesAnnouncementsPatch'
{ _capXgafv = Nothing
, _capUploadProtocol = Nothing
, _capUpdateMask = Nothing
, _capCourseId = pCapCourseId_
, _capAccessToken = Nothing
, _capUploadType = Nothing
, _capPayload = pCapPayload_
, _capId = pCapId_
, _capCallback = Nothing
}
capXgafv :: Lens' CoursesAnnouncementsPatch (Maybe Xgafv)
capXgafv = lens _capXgafv (\ s a -> s{_capXgafv = a})
capUploadProtocol :: Lens' CoursesAnnouncementsPatch (Maybe Text)
capUploadProtocol
= lens _capUploadProtocol
(\ s a -> s{_capUploadProtocol = a})
capUpdateMask :: Lens' CoursesAnnouncementsPatch (Maybe GFieldMask)
capUpdateMask
= lens _capUpdateMask
(\ s a -> s{_capUpdateMask = a})
capCourseId :: Lens' CoursesAnnouncementsPatch Text
capCourseId
= lens _capCourseId (\ s a -> s{_capCourseId = a})
capAccessToken :: Lens' CoursesAnnouncementsPatch (Maybe Text)
capAccessToken
= lens _capAccessToken
(\ s a -> s{_capAccessToken = a})
capUploadType :: Lens' CoursesAnnouncementsPatch (Maybe Text)
capUploadType
= lens _capUploadType
(\ s a -> s{_capUploadType = a})
capPayload :: Lens' CoursesAnnouncementsPatch Announcement
capPayload
= lens _capPayload (\ s a -> s{_capPayload = a})
capId :: Lens' CoursesAnnouncementsPatch Text
capId = lens _capId (\ s a -> s{_capId = a})
capCallback :: Lens' CoursesAnnouncementsPatch (Maybe Text)
capCallback
= lens _capCallback (\ s a -> s{_capCallback = a})
instance GoogleRequest CoursesAnnouncementsPatch
where
type Rs CoursesAnnouncementsPatch = Announcement
type Scopes CoursesAnnouncementsPatch =
'["https://www.googleapis.com/auth/classroom.announcements"]
requestClient CoursesAnnouncementsPatch'{..}
= go _capCourseId _capId _capXgafv _capUploadProtocol
_capUpdateMask
_capAccessToken
_capUploadType
_capCallback
(Just AltJSON)
_capPayload
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesAnnouncementsPatchResource)
mempty