{-# 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.Create
(
InvitationsCreateResource
, invitationsCreate
, InvitationsCreate
, icXgafv
, icUploadProtocol
, icAccessToken
, icUploadType
, icPayload
, icCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type InvitationsCreateResource =
"v1" :>
"invitations" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Invitation :> Post '[JSON] Invitation
data InvitationsCreate = InvitationsCreate'
{ _icXgafv :: !(Maybe Xgafv)
, _icUploadProtocol :: !(Maybe Text)
, _icAccessToken :: !(Maybe Text)
, _icUploadType :: !(Maybe Text)
, _icPayload :: !Invitation
, _icCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
invitationsCreate
:: Invitation
-> InvitationsCreate
invitationsCreate pIcPayload_ =
InvitationsCreate'
{ _icXgafv = Nothing
, _icUploadProtocol = Nothing
, _icAccessToken = Nothing
, _icUploadType = Nothing
, _icPayload = pIcPayload_
, _icCallback = Nothing
}
icXgafv :: Lens' InvitationsCreate (Maybe Xgafv)
icXgafv = lens _icXgafv (\ s a -> s{_icXgafv = a})
icUploadProtocol :: Lens' InvitationsCreate (Maybe Text)
icUploadProtocol
= lens _icUploadProtocol
(\ s a -> s{_icUploadProtocol = a})
icAccessToken :: Lens' InvitationsCreate (Maybe Text)
icAccessToken
= lens _icAccessToken
(\ s a -> s{_icAccessToken = a})
icUploadType :: Lens' InvitationsCreate (Maybe Text)
icUploadType
= lens _icUploadType (\ s a -> s{_icUploadType = a})
icPayload :: Lens' InvitationsCreate Invitation
icPayload
= lens _icPayload (\ s a -> s{_icPayload = a})
icCallback :: Lens' InvitationsCreate (Maybe Text)
icCallback
= lens _icCallback (\ s a -> s{_icCallback = a})
instance GoogleRequest InvitationsCreate where
type Rs InvitationsCreate = Invitation
type Scopes InvitationsCreate =
'["https://www.googleapis.com/auth/classroom.rosters"]
requestClient InvitationsCreate'{..}
= go _icXgafv _icUploadProtocol _icAccessToken
_icUploadType
_icCallback
(Just AltJSON)
_icPayload
classroomService
where go
= buildClient
(Proxy :: Proxy InvitationsCreateResource)
mempty