{-# 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.UserProFiles.GuardianInvitations.Patch
(
UserProFilesGuardianInvitationsPatchResource
, userProFilesGuardianInvitationsPatch
, UserProFilesGuardianInvitationsPatch
, upfgipStudentId
, upfgipXgafv
, upfgipUploadProtocol
, upfgipUpdateMask
, upfgipAccessToken
, upfgipUploadType
, upfgipPayload
, upfgipInvitationId
, upfgipCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type UserProFilesGuardianInvitationsPatchResource =
"v1" :>
"userProfiles" :>
Capture "studentId" Text :>
"guardianInvitations" :>
Capture "invitationId" 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] GuardianInvitation :>
Patch '[JSON] GuardianInvitation
data UserProFilesGuardianInvitationsPatch = UserProFilesGuardianInvitationsPatch'
{ _upfgipStudentId :: !Text
, _upfgipXgafv :: !(Maybe Xgafv)
, _upfgipUploadProtocol :: !(Maybe Text)
, _upfgipUpdateMask :: !(Maybe GFieldMask)
, _upfgipAccessToken :: !(Maybe Text)
, _upfgipUploadType :: !(Maybe Text)
, _upfgipPayload :: !GuardianInvitation
, _upfgipInvitationId :: !Text
, _upfgipCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userProFilesGuardianInvitationsPatch
:: Text
-> GuardianInvitation
-> Text
-> UserProFilesGuardianInvitationsPatch
userProFilesGuardianInvitationsPatch pUpfgipStudentId_ pUpfgipPayload_ pUpfgipInvitationId_ =
UserProFilesGuardianInvitationsPatch'
{ _upfgipStudentId = pUpfgipStudentId_
, _upfgipXgafv = Nothing
, _upfgipUploadProtocol = Nothing
, _upfgipUpdateMask = Nothing
, _upfgipAccessToken = Nothing
, _upfgipUploadType = Nothing
, _upfgipPayload = pUpfgipPayload_
, _upfgipInvitationId = pUpfgipInvitationId_
, _upfgipCallback = Nothing
}
upfgipStudentId :: Lens' UserProFilesGuardianInvitationsPatch Text
upfgipStudentId
= lens _upfgipStudentId
(\ s a -> s{_upfgipStudentId = a})
upfgipXgafv :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Xgafv)
upfgipXgafv
= lens _upfgipXgafv (\ s a -> s{_upfgipXgafv = a})
upfgipUploadProtocol :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
upfgipUploadProtocol
= lens _upfgipUploadProtocol
(\ s a -> s{_upfgipUploadProtocol = a})
upfgipUpdateMask :: Lens' UserProFilesGuardianInvitationsPatch (Maybe GFieldMask)
upfgipUpdateMask
= lens _upfgipUpdateMask
(\ s a -> s{_upfgipUpdateMask = a})
upfgipAccessToken :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
upfgipAccessToken
= lens _upfgipAccessToken
(\ s a -> s{_upfgipAccessToken = a})
upfgipUploadType :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
upfgipUploadType
= lens _upfgipUploadType
(\ s a -> s{_upfgipUploadType = a})
upfgipPayload :: Lens' UserProFilesGuardianInvitationsPatch GuardianInvitation
upfgipPayload
= lens _upfgipPayload
(\ s a -> s{_upfgipPayload = a})
upfgipInvitationId :: Lens' UserProFilesGuardianInvitationsPatch Text
upfgipInvitationId
= lens _upfgipInvitationId
(\ s a -> s{_upfgipInvitationId = a})
upfgipCallback :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
upfgipCallback
= lens _upfgipCallback
(\ s a -> s{_upfgipCallback = a})
instance GoogleRequest
UserProFilesGuardianInvitationsPatch where
type Rs UserProFilesGuardianInvitationsPatch =
GuardianInvitation
type Scopes UserProFilesGuardianInvitationsPatch =
'["https://www.googleapis.com/auth/classroom.guardianlinks.students"]
requestClient
UserProFilesGuardianInvitationsPatch'{..}
= go _upfgipStudentId _upfgipInvitationId
_upfgipXgafv
_upfgipUploadProtocol
_upfgipUpdateMask
_upfgipAccessToken
_upfgipUploadType
_upfgipCallback
(Just AltJSON)
_upfgipPayload
classroomService
where go
= buildClient
(Proxy ::
Proxy UserProFilesGuardianInvitationsPatchResource)
mempty