gogol-classroom-0.4.0: Google Classroom SDK.

Copyright(c) 2015-2016 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.Resource.Classroom.Courses.Create

Contents

Description

Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.

See: Google Classroom API Reference for classroom.courses.create.

Synopsis

REST Resource

type CoursesCreateResource = "v1" :> ("courses" :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Course :> Post '[JSON] Course)))))))) Source #

A resource alias for classroom.courses.create method which the CoursesCreate request conforms to.

Creating a Request

coursesCreate Source #

Creates a value of CoursesCreate with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data CoursesCreate Source #

Creates a course. The user specified in `ownerId` is the owner of the created course and added as a teacher. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for access errors. * `NOT_FOUND` if the primary teacher is not a valid user. * `FAILED_PRECONDITION` if the course owner's account is disabled or for the following request errors: * UserGroupsMembershipLimitReached * `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.

See: coursesCreate smart constructor.

Instances
Eq CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

Data CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> CoursesCreate -> c CoursesCreate #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c CoursesCreate #

toConstr :: CoursesCreate -> Constr #

dataTypeOf :: CoursesCreate -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c CoursesCreate) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c CoursesCreate) #

gmapT :: (forall b. Data b => b -> b) -> CoursesCreate -> CoursesCreate #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CoursesCreate -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CoursesCreate -> r #

gmapQ :: (forall d. Data d => d -> u) -> CoursesCreate -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CoursesCreate -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CoursesCreate -> m CoursesCreate #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CoursesCreate -> m CoursesCreate #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CoursesCreate -> m CoursesCreate #

Show CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

Generic CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

Associated Types

type Rep CoursesCreate :: Type -> Type #

GoogleRequest CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

Associated Types

type Rs CoursesCreate :: Type #

type Scopes CoursesCreate :: [Symbol] #

type Rep CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

type Rep CoursesCreate = D1 (MetaData "CoursesCreate" "Network.Google.Resource.Classroom.Courses.Create" "gogol-classroom-0.4.0-8aa8kYGMMJyCKn01TYMpOR" False) (C1 (MetaCons "CoursesCreate'" PrefixI True) ((S1 (MetaSel (Just "_ccXgafv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Xgafv)) :*: (S1 (MetaSel (Just "_ccUploadProtocol") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_ccAccessToken") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)))) :*: (S1 (MetaSel (Just "_ccUploadType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_ccPayload") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Course) :*: S1 (MetaSel (Just "_ccCallback") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))))
type Scopes CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

type Scopes CoursesCreate = "https://www.googleapis.com/auth/classroom.courses" ': ([] :: [Symbol])
type Rs CoursesCreate Source # 
Instance details

Defined in Network.Google.Resource.Classroom.Courses.Create

Request Lenses

ccUploadProtocol :: Lens' CoursesCreate (Maybe Text) Source #

Upload protocol for media (e.g. "raw", "multipart").

ccUploadType :: Lens' CoursesCreate (Maybe Text) Source #

Legacy upload protocol for media (e.g. "media", "multipart").

ccPayload :: Lens' CoursesCreate Course Source #

Multipart request metadata.