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 |
Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
See: Google Classroom API Reference for classroom.courses.patch
.
Synopsis
- type CoursesPatchResource = "v1" :> ("courses" :> (Capture "id" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "updateMask" GFieldMask :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Course :> Patch '[JSON] Course))))))))))
- coursesPatch :: Course -> Text -> CoursesPatch
- data CoursesPatch
- cpXgafv :: Lens' CoursesPatch (Maybe Xgafv)
- cpUploadProtocol :: Lens' CoursesPatch (Maybe Text)
- cpUpdateMask :: Lens' CoursesPatch (Maybe GFieldMask)
- cpAccessToken :: Lens' CoursesPatch (Maybe Text)
- cpUploadType :: Lens' CoursesPatch (Maybe Text)
- cpPayload :: Lens' CoursesPatch Course
- cpId :: Lens' CoursesPatch Text
- cpCallback :: Lens' CoursesPatch (Maybe Text)
REST Resource
type CoursesPatchResource = "v1" :> ("courses" :> (Capture "id" Text :> (QueryParam "$.xgafv" Xgafv :> (QueryParam "upload_protocol" Text :> (QueryParam "updateMask" GFieldMask :> (QueryParam "access_token" Text :> (QueryParam "uploadType" Text :> (QueryParam "callback" Text :> (QueryParam "alt" AltJSON :> (ReqBody '[JSON] Course :> Patch '[JSON] Course)))))))))) Source #
A resource alias for classroom.courses.patch
method which the
CoursesPatch
request conforms to.
Creating a Request
:: Course | |
-> Text | |
-> CoursesPatch |
Creates a value of CoursesPatch
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CoursesPatch Source #
Updates one or more fields in a course. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting user is not permitted to modify the requested course or for access errors. * `NOT_FOUND` if no course exists with the requested ID. * `INVALID_ARGUMENT` if invalid fields are specified in the update mask or if no update mask is supplied. * `FAILED_PRECONDITION` for the following request errors: * CourseNotModifiable
See: coursesPatch
smart constructor.
Instances
Request Lenses
cpUploadProtocol :: Lens' CoursesPatch (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
cpUpdateMask :: Lens' CoursesPatch (Maybe GFieldMask) Source #
Mask that identifies which fields on the course to update. This field is required to do an update. The update will fail if invalid fields are specified. The following fields are valid: * `name` * `section` * `descriptionHeading` * `description` * `room` * `courseState` * `ownerId` Note: patches to ownerId are treated as being effective immediately, but in practice it may take some time for the ownership transfer of all affected resources to complete. When set in a query parameter, this field should be specified as `updateMask=,,...`
cpAccessToken :: Lens' CoursesPatch (Maybe Text) Source #
OAuth access token.
cpUploadType :: Lens' CoursesPatch (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
cpId :: Lens' CoursesPatch Text Source #
Identifier of the course to update. This identifier can be either the Classroom-assigned identifier or an alias.
cpCallback :: Lens' CoursesPatch (Maybe Text) Source #
JSONP