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 |
Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.
See: Google Classroom API Reference for classroom.userProfiles.guardianInvitations.patch
.
Synopsis
- type UserProFilesGuardianInvitationsPatchResource = "v1" :> ("userProfiles" :> (Capture "studentId" Text :> ("guardianInvitations" :> (Capture "invitationId" 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] GuardianInvitation :> Patch '[JSON] GuardianInvitation))))))))))))
- userProFilesGuardianInvitationsPatch :: Text -> GuardianInvitation -> Text -> UserProFilesGuardianInvitationsPatch
- data UserProFilesGuardianInvitationsPatch
- upfgipStudentId :: Lens' UserProFilesGuardianInvitationsPatch Text
- upfgipXgafv :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Xgafv)
- upfgipUploadProtocol :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
- upfgipUpdateMask :: Lens' UserProFilesGuardianInvitationsPatch (Maybe GFieldMask)
- upfgipAccessToken :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
- upfgipUploadType :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
- upfgipPayload :: Lens' UserProFilesGuardianInvitationsPatch GuardianInvitation
- upfgipInvitationId :: Lens' UserProFilesGuardianInvitationsPatch Text
- upfgipCallback :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text)
REST Resource
type UserProFilesGuardianInvitationsPatchResource = "v1" :> ("userProfiles" :> (Capture "studentId" Text :> ("guardianInvitations" :> (Capture "invitationId" 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] GuardianInvitation :> Patch '[JSON] GuardianInvitation)))))))))))) Source #
A resource alias for classroom.userProfiles.guardianInvitations.patch
method which the
UserProFilesGuardianInvitationsPatch
request conforms to.
Creating a Request
userProFilesGuardianInvitationsPatch Source #
Creates a value of UserProFilesGuardianInvitationsPatch
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data UserProFilesGuardianInvitationsPatch Source #
Modifies a guardian invitation. Currently, the only valid modification is to change the `state` from `PENDING` to `COMPLETE`. This has the effect of withdrawing the invitation. This method returns the following error codes: * `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if guardians are not enabled for the domain in question or for other access errors. * `FAILED_PRECONDITION` if the guardian link is not in the `PENDING` state. * `INVALID_ARGUMENT` if the format of the student ID provided cannot be recognized (it is not an email address, nor a `user_id` from this API), or if the passed `GuardianInvitation` has a `state` other than `COMPLETE`, or if it modifies fields other than `state`. * `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student, or if the `id` field does not refer to a guardian invitation known to Classroom.
See: userProFilesGuardianInvitationsPatch
smart constructor.
Instances
Request Lenses
upfgipStudentId :: Lens' UserProFilesGuardianInvitationsPatch Text Source #
The ID of the student whose guardian invitation is to be modified.
upfgipXgafv :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Xgafv) Source #
V1 error format.
upfgipUploadProtocol :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text) Source #
Upload protocol for media (e.g. "raw", "multipart").
upfgipUpdateMask :: Lens' UserProFilesGuardianInvitationsPatch (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: * `state` When set in a query parameter, this field should be specified as `updateMask=,,...`
upfgipAccessToken :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text) Source #
OAuth access token.
upfgipUploadType :: Lens' UserProFilesGuardianInvitationsPatch (Maybe Text) Source #
Legacy upload protocol for media (e.g. "media", "multipart").
upfgipPayload :: Lens' UserProFilesGuardianInvitationsPatch GuardianInvitation Source #
Multipart request metadata.
upfgipInvitationId :: Lens' UserProFilesGuardianInvitationsPatch Text Source #
The `id` field of the `GuardianInvitation` to be modified.