Copyright | (c) 2015-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).
See: Google Classroom API Reference for classroom.courses.aliases.create
.
Synopsis
- 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))))))))))
- coursesAliasesCreate :: Text -> CourseAlias -> CoursesAliasesCreate
- data CoursesAliasesCreate
- cacXgafv :: Lens' CoursesAliasesCreate (Maybe Xgafv)
- cacUploadProtocol :: Lens' CoursesAliasesCreate (Maybe Text)
- cacCourseId :: Lens' CoursesAliasesCreate Text
- cacAccessToken :: Lens' CoursesAliasesCreate (Maybe Text)
- cacUploadType :: Lens' CoursesAliasesCreate (Maybe Text)
- cacPayload :: Lens' CoursesAliasesCreate CourseAlias
- cacCallback :: Lens' CoursesAliasesCreate (Maybe Text)
REST Resource
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)))))))))) Source #
A resource alias for classroom.courses.aliases.create
method which the
CoursesAliasesCreate
request conforms to.
Creating a Request
Creates a value of CoursesAliasesCreate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CoursesAliasesCreate Source #
Creates an alias for a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to create the alias or for access errors. * `NOT_FOUND` if the course does not exist. * `ALREADY_EXISTS` if the alias already exists. * `FAILED_PRECONDITION` if the alias requested does not make sense for the requesting user or course (for example, if a user not in a domain attempts to access a domain-scoped alias).
See: coursesAliasesCreate
smart constructor.
Instances
Request Lenses
cacUploadProtocol :: Lens' CoursesAliasesCreate (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
cacCourseId :: Lens' CoursesAliasesCreate Text Source #
Identifier of the course to alias. This identifier can be either the Classroom-assigned identifier or an alias.
cacAccessToken :: Lens' CoursesAliasesCreate (Maybe Text) Source #
OAuth access token.
cacUploadType :: Lens' CoursesAliasesCreate (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
cacPayload :: Lens' CoursesAliasesCreate CourseAlias Source #
Multipart request metadata.
cacCallback :: Lens' CoursesAliasesCreate (Maybe Text) Source #
JSONP