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 of an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist
See: Google Classroom API Reference for classroom.courses.announcements.patch
.
Synopsis
- type CoursesAnnouncementsPatchResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("announcements" :> (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] Announcement :> Patch '[JSON] Announcement))))))))))))
- coursesAnnouncementsPatch :: Text -> Announcement -> Text -> CoursesAnnouncementsPatch
- data CoursesAnnouncementsPatch
- capXgafv :: Lens' CoursesAnnouncementsPatch (Maybe Xgafv)
- capUploadProtocol :: Lens' CoursesAnnouncementsPatch (Maybe Text)
- capUpdateMask :: Lens' CoursesAnnouncementsPatch (Maybe GFieldMask)
- capCourseId :: Lens' CoursesAnnouncementsPatch Text
- capAccessToken :: Lens' CoursesAnnouncementsPatch (Maybe Text)
- capUploadType :: Lens' CoursesAnnouncementsPatch (Maybe Text)
- capPayload :: Lens' CoursesAnnouncementsPatch Announcement
- capId :: Lens' CoursesAnnouncementsPatch Text
- capCallback :: Lens' CoursesAnnouncementsPatch (Maybe Text)
REST Resource
type CoursesAnnouncementsPatchResource = "v1" :> ("courses" :> (Capture "courseId" Text :> ("announcements" :> (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] Announcement :> Patch '[JSON] Announcement)))))))))))) Source #
A resource alias for classroom.courses.announcements.patch
method which the
CoursesAnnouncementsPatch
request conforms to.
Creating a Request
coursesAnnouncementsPatch Source #
Creates a value of CoursesAnnouncementsPatch
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data CoursesAnnouncementsPatch Source #
Updates one or more fields of an announcement. This method returns the following error codes: * `PERMISSION_DENIED` if the requesting developer project did not create the corresponding announcement or for access errors. * `INVALID_ARGUMENT` if the request is malformed. * `FAILED_PRECONDITION` if the requested announcement has already been deleted. * `NOT_FOUND` if the requested course or announcement does not exist
See: coursesAnnouncementsPatch
smart constructor.
Instances
Request Lenses
capUploadProtocol :: Lens' CoursesAnnouncementsPatch (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
capUpdateMask :: Lens' CoursesAnnouncementsPatch (Maybe GFieldMask) Source #
Mask that identifies which fields on the announcement to update. This field is required to do an update. The update fails if invalid fields are specified. If a field supports empty values, it can be cleared by specifying it in the update mask and not in the Announcement object. If a field that does not support empty values is included in the update mask and not set in the Announcement object, an `INVALID_ARGUMENT` error will be returned. The following fields may be specified by teachers: * `text` * `state` * `scheduled_time`
capCourseId :: Lens' CoursesAnnouncementsPatch Text Source #
Identifier of the course. This identifier can be either the Classroom-assigned identifier or an alias.
capAccessToken :: Lens' CoursesAnnouncementsPatch (Maybe Text) Source #
OAuth access token.
capUploadType :: Lens' CoursesAnnouncementsPatch (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
capPayload :: Lens' CoursesAnnouncementsPatch Announcement Source #
Multipart request metadata.
capCallback :: Lens' CoursesAnnouncementsPatch (Maybe Text) Source #
JSONP