{-# 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.Invitations.Get
(
InvitationsGetResource
, invitationsGet
, InvitationsGet
, igXgafv
, igUploadProtocol
, igAccessToken
, igUploadType
, igId
, igCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type InvitationsGetResource =
"v1" :>
"invitations" :>
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] Invitation
data InvitationsGet = InvitationsGet'
{ _igXgafv :: !(Maybe Xgafv)
, _igUploadProtocol :: !(Maybe Text)
, _igAccessToken :: !(Maybe Text)
, _igUploadType :: !(Maybe Text)
, _igId :: !Text
, _igCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
invitationsGet
:: Text
-> InvitationsGet
invitationsGet pIgId_ =
InvitationsGet'
{ _igXgafv = Nothing
, _igUploadProtocol = Nothing
, _igAccessToken = Nothing
, _igUploadType = Nothing
, _igId = pIgId_
, _igCallback = Nothing
}
igXgafv :: Lens' InvitationsGet (Maybe Xgafv)
igXgafv = lens _igXgafv (\ s a -> s{_igXgafv = a})
igUploadProtocol :: Lens' InvitationsGet (Maybe Text)
igUploadProtocol
= lens _igUploadProtocol
(\ s a -> s{_igUploadProtocol = a})
igAccessToken :: Lens' InvitationsGet (Maybe Text)
igAccessToken
= lens _igAccessToken
(\ s a -> s{_igAccessToken = a})
igUploadType :: Lens' InvitationsGet (Maybe Text)
igUploadType
= lens _igUploadType (\ s a -> s{_igUploadType = a})
igId :: Lens' InvitationsGet Text
igId = lens _igId (\ s a -> s{_igId = a})
igCallback :: Lens' InvitationsGet (Maybe Text)
igCallback
= lens _igCallback (\ s a -> s{_igCallback = a})
instance GoogleRequest InvitationsGet where
type Rs InvitationsGet = Invitation
type Scopes InvitationsGet =
'["https://www.googleapis.com/auth/classroom.rosters",
"https://www.googleapis.com/auth/classroom.rosters.readonly"]
requestClient InvitationsGet'{..}
= go _igId _igXgafv _igUploadProtocol _igAccessToken
_igUploadType
_igCallback
(Just AltJSON)
classroomService
where go
= buildClient (Proxy :: Proxy InvitationsGetResource)
mempty