{-# 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.Accept
(
InvitationsAcceptResource
, invitationsAccept
, InvitationsAccept
, iaXgafv
, iaUploadProtocol
, iaAccessToken
, iaUploadType
, iaId
, iaCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type InvitationsAcceptResource =
"v1" :>
"invitations" :>
CaptureMode "id" "accept" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] Empty
data InvitationsAccept = InvitationsAccept'
{ _iaXgafv :: !(Maybe Xgafv)
, _iaUploadProtocol :: !(Maybe Text)
, _iaAccessToken :: !(Maybe Text)
, _iaUploadType :: !(Maybe Text)
, _iaId :: !Text
, _iaCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
invitationsAccept
:: Text
-> InvitationsAccept
invitationsAccept pIaId_ =
InvitationsAccept'
{ _iaXgafv = Nothing
, _iaUploadProtocol = Nothing
, _iaAccessToken = Nothing
, _iaUploadType = Nothing
, _iaId = pIaId_
, _iaCallback = Nothing
}
iaXgafv :: Lens' InvitationsAccept (Maybe Xgafv)
iaXgafv = lens _iaXgafv (\ s a -> s{_iaXgafv = a})
iaUploadProtocol :: Lens' InvitationsAccept (Maybe Text)
iaUploadProtocol
= lens _iaUploadProtocol
(\ s a -> s{_iaUploadProtocol = a})
iaAccessToken :: Lens' InvitationsAccept (Maybe Text)
iaAccessToken
= lens _iaAccessToken
(\ s a -> s{_iaAccessToken = a})
iaUploadType :: Lens' InvitationsAccept (Maybe Text)
iaUploadType
= lens _iaUploadType (\ s a -> s{_iaUploadType = a})
iaId :: Lens' InvitationsAccept Text
iaId = lens _iaId (\ s a -> s{_iaId = a})
iaCallback :: Lens' InvitationsAccept (Maybe Text)
iaCallback
= lens _iaCallback (\ s a -> s{_iaCallback = a})
instance GoogleRequest InvitationsAccept where
type Rs InvitationsAccept = Empty
type Scopes InvitationsAccept =
'["https://www.googleapis.com/auth/classroom.rosters"]
requestClient InvitationsAccept'{..}
= go _iaId _iaXgafv _iaUploadProtocol _iaAccessToken
_iaUploadType
_iaCallback
(Just AltJSON)
classroomService
where go
= buildClient
(Proxy :: Proxy InvitationsAcceptResource)
mempty