{-# 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.Guardians.Get
(
UserProFilesGuardiansGetResource
, userProFilesGuardiansGet
, UserProFilesGuardiansGet
, upfggStudentId
, upfggXgafv
, upfggUploadProtocol
, upfggAccessToken
, upfggUploadType
, upfggGuardianId
, upfggCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type UserProFilesGuardiansGetResource =
"v1" :>
"userProfiles" :>
Capture "studentId" Text :>
"guardians" :>
Capture "guardianId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Guardian
data UserProFilesGuardiansGet = UserProFilesGuardiansGet'
{ _upfggStudentId :: !Text
, _upfggXgafv :: !(Maybe Xgafv)
, _upfggUploadProtocol :: !(Maybe Text)
, _upfggAccessToken :: !(Maybe Text)
, _upfggUploadType :: !(Maybe Text)
, _upfggGuardianId :: !Text
, _upfggCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
userProFilesGuardiansGet
:: Text
-> Text
-> UserProFilesGuardiansGet
userProFilesGuardiansGet pUpfggStudentId_ pUpfggGuardianId_ =
UserProFilesGuardiansGet'
{ _upfggStudentId = pUpfggStudentId_
, _upfggXgafv = Nothing
, _upfggUploadProtocol = Nothing
, _upfggAccessToken = Nothing
, _upfggUploadType = Nothing
, _upfggGuardianId = pUpfggGuardianId_
, _upfggCallback = Nothing
}
upfggStudentId :: Lens' UserProFilesGuardiansGet Text
upfggStudentId
= lens _upfggStudentId
(\ s a -> s{_upfggStudentId = a})
upfggXgafv :: Lens' UserProFilesGuardiansGet (Maybe Xgafv)
upfggXgafv
= lens _upfggXgafv (\ s a -> s{_upfggXgafv = a})
upfggUploadProtocol :: Lens' UserProFilesGuardiansGet (Maybe Text)
upfggUploadProtocol
= lens _upfggUploadProtocol
(\ s a -> s{_upfggUploadProtocol = a})
upfggAccessToken :: Lens' UserProFilesGuardiansGet (Maybe Text)
upfggAccessToken
= lens _upfggAccessToken
(\ s a -> s{_upfggAccessToken = a})
upfggUploadType :: Lens' UserProFilesGuardiansGet (Maybe Text)
upfggUploadType
= lens _upfggUploadType
(\ s a -> s{_upfggUploadType = a})
upfggGuardianId :: Lens' UserProFilesGuardiansGet Text
upfggGuardianId
= lens _upfggGuardianId
(\ s a -> s{_upfggGuardianId = a})
upfggCallback :: Lens' UserProFilesGuardiansGet (Maybe Text)
upfggCallback
= lens _upfggCallback
(\ s a -> s{_upfggCallback = a})
instance GoogleRequest UserProFilesGuardiansGet where
type Rs UserProFilesGuardiansGet = Guardian
type Scopes UserProFilesGuardiansGet =
'["https://www.googleapis.com/auth/classroom.guardianlinks.me.readonly",
"https://www.googleapis.com/auth/classroom.guardianlinks.students",
"https://www.googleapis.com/auth/classroom.guardianlinks.students.readonly"]
requestClient UserProFilesGuardiansGet'{..}
= go _upfggStudentId _upfggGuardianId _upfggXgafv
_upfggUploadProtocol
_upfggAccessToken
_upfggUploadType
_upfggCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy UserProFilesGuardiansGetResource)
mempty