{-# 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.Courses.Aliases.Create
(
CoursesAliasesCreateResource
, coursesAliasesCreate
, CoursesAliasesCreate
, cacXgafv
, cacUploadProtocol
, cacCourseId
, cacAccessToken
, cacUploadType
, cacPayload
, cacCallback
) where
import Network.Google.Classroom.Types
import Network.Google.Prelude
type CoursesAliasesCreateResource =
"v1" :>
"courses" :>
Capture "courseId" Text :>
"aliases" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CourseAlias :>
Post '[JSON] CourseAlias
data CoursesAliasesCreate = CoursesAliasesCreate'
{ _cacXgafv :: !(Maybe Xgafv)
, _cacUploadProtocol :: !(Maybe Text)
, _cacCourseId :: !Text
, _cacAccessToken :: !(Maybe Text)
, _cacUploadType :: !(Maybe Text)
, _cacPayload :: !CourseAlias
, _cacCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
coursesAliasesCreate
:: Text
-> CourseAlias
-> CoursesAliasesCreate
coursesAliasesCreate pCacCourseId_ pCacPayload_ =
CoursesAliasesCreate'
{ _cacXgafv = Nothing
, _cacUploadProtocol = Nothing
, _cacCourseId = pCacCourseId_
, _cacAccessToken = Nothing
, _cacUploadType = Nothing
, _cacPayload = pCacPayload_
, _cacCallback = Nothing
}
cacXgafv :: Lens' CoursesAliasesCreate (Maybe Xgafv)
cacXgafv = lens _cacXgafv (\ s a -> s{_cacXgafv = a})
cacUploadProtocol :: Lens' CoursesAliasesCreate (Maybe Text)
cacUploadProtocol
= lens _cacUploadProtocol
(\ s a -> s{_cacUploadProtocol = a})
cacCourseId :: Lens' CoursesAliasesCreate Text
cacCourseId
= lens _cacCourseId (\ s a -> s{_cacCourseId = a})
cacAccessToken :: Lens' CoursesAliasesCreate (Maybe Text)
cacAccessToken
= lens _cacAccessToken
(\ s a -> s{_cacAccessToken = a})
cacUploadType :: Lens' CoursesAliasesCreate (Maybe Text)
cacUploadType
= lens _cacUploadType
(\ s a -> s{_cacUploadType = a})
cacPayload :: Lens' CoursesAliasesCreate CourseAlias
cacPayload
= lens _cacPayload (\ s a -> s{_cacPayload = a})
cacCallback :: Lens' CoursesAliasesCreate (Maybe Text)
cacCallback
= lens _cacCallback (\ s a -> s{_cacCallback = a})
instance GoogleRequest CoursesAliasesCreate where
type Rs CoursesAliasesCreate = CourseAlias
type Scopes CoursesAliasesCreate =
'["https://www.googleapis.com/auth/classroom.courses"]
requestClient CoursesAliasesCreate'{..}
= go _cacCourseId _cacXgafv _cacUploadProtocol
_cacAccessToken
_cacUploadType
_cacCallback
(Just AltJSON)
_cacPayload
classroomService
where go
= buildClient
(Proxy :: Proxy CoursesAliasesCreateResource)
mempty