@@ -435,6 +435,49 @@ class EndpointProjects extends _i1.EndpointRef {
435435 'fetchProjectConfig' ,
436436 {'cloudProjectId' : cloudProjectId},
437437 );
438+
439+ /// Attaches an existing user to a project by assigning the specified roles.
440+ ///
441+ /// Throws [NotFoundException] if the user, project, or any of the roles
442+ /// do not exist.
443+ _i2.Future <void > attachUser ({
444+ required String cloudProjectId,
445+ required String email,
446+ required List <String > assignRoleNames,
447+ }) =>
448+ caller.callServerEndpoint <void >(
449+ 'projects' ,
450+ 'attachUser' ,
451+ {
452+ 'cloudProjectId' : cloudProjectId,
453+ 'email' : email,
454+ 'assignRoleNames' : assignRoleNames,
455+ },
456+ );
457+
458+ /// Detaches an existing user from a project by removing the specified roles.
459+ /// If any of the roles do not exist or are not previously assigned to the
460+ /// user, they are simply ignored.
461+ /// If [unassignAllRoles] is true, all roles on the project are unassigned
462+ /// from the user.
463+ ///
464+ /// Throws [NotFoundException] if the user or project does not exist.
465+ _i2.Future <void > detachUser ({
466+ required String cloudProjectId,
467+ required String email,
468+ List <String >? unassignRoleNames,
469+ bool ? unassignAllRoles,
470+ }) =>
471+ caller.callServerEndpoint <void >(
472+ 'projects' ,
473+ 'detachUser' ,
474+ {
475+ 'cloudProjectId' : cloudProjectId,
476+ 'email' : email,
477+ 'unassignRoleNames' : unassignRoleNames,
478+ 'unassignAllRoles' : unassignAllRoles,
479+ },
480+ );
438481}
439482
440483/// Endpoint for managing access roles.
0 commit comments