Class UpdateUserGroupApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.UpdateUserGroupApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
Zulip API request builder for updating a user group.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUpdateUserGroupApiRequest
(ZulipHttpClient client, long groupId) Constructs aUpdateUserGroupApiRequest
.UpdateUserGroupApiRequest
(ZulipHttpClient client, String name, String description, long groupId) Constructs aUpdateUserGroupApiRequest
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes the Zulip API request for updating a user group.withCanAddMembersGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to add members to this group.withCanJoinMembersGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to join this group.withCanLeaveGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to leave this group.withCanManageGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to manage this group.withCanMentionGroup
(long userGroupId) Deprecated, for removal: This API element is subject to removal in a future version.withCanMentionGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to mention this group.withCanRemoveMembersGroup
(UserGroupSetting userGroupSetting) Sets the users who have permission to remove members from this group.withDescription
(String description) Sets the updated description of the user group.Sets the updated name of the user group.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
NAME
- See Also:
-
DESCRIPTION
- See Also:
-
CAN_ADD_MEMBERS_GROUP
- See Also:
-
CAN_JOIN_GROUP
- See Also:
-
CAN_LEAVE_GROUP
- See Also:
-
CAN_MANAGE_GROUP
- See Also:
-
CAN_MENTION_GROUP
- See Also:
-
CAN_REMOVE_MEMBERS_GROUP
- See Also:
-
-
Constructor Details
-
UpdateUserGroupApiRequest
Constructs aUpdateUserGroupApiRequest
.- Parameters:
client
- The Zulip HTTP clientgroupId
- The id of the group to update
-
UpdateUserGroupApiRequest
public UpdateUserGroupApiRequest(ZulipHttpClient client, String name, String description, long groupId) Constructs aUpdateUserGroupApiRequest
.- Parameters:
client
- The Zulip HTTP clientname
- The updated name of the user groupdescription
- The updated description of the user groupgroupId
- The id of the group to update
-
-
Method Details
-
withDescription
Sets the updated description of the user group.- Parameters:
description
- The new description of the user group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withName
Sets the updated name of the user group.- Parameters:
name
- The new name of the user group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withCanMentionGroup
Deprecated, for removal: This API element is subject to removal in a future version.Sets the optional ID of the user group whose members are allowed to mention the new user group.- Parameters:
userGroupId
- The new ID of the user group whose members are allowed to mention the new user group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withCanMentionGroup
Sets the users who have permission to mention this group.- Parameters:
userGroupSetting
- TheUserGroupSetting
for users who have permission to mention this group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withCanAddMembersGroup
Sets the users who have permission to add members to this group.- Parameters:
userGroupSetting
- TheUserGroupSetting
for users who have permission to add members to this group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withCanJoinMembersGroup
Sets the users who have permission to join this group.- Parameters:
userGroupSetting
- TheUserGroupSetting
for users who have permission to join this group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withCanLeaveGroup
Sets the users who have permission to leave this group.- Parameters:
userGroupSetting
- TheUserGroupSetting
for users who have permission to leave this group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withCanManageGroup
Sets the users who have permission to manage this group.- Parameters:
userGroupSetting
- TheUserGroupSetting
for users who have permission to manage this group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
withCanRemoveMembersGroup
Sets the users who have permission to remove members from this group.- Parameters:
userGroupSetting
- TheUserGroupSetting
for users who have permission to remove members from this group- Returns:
- This
UpdateUserGroupApiRequest
instance
-
execute
Executes the Zulip API request for updating a user group.- Specified by:
execute
in interfaceVoidExecutableApiRequest
- Throws:
ZulipClientException
- if the request was not successful
-
withCanMentionGroup(UserGroupSetting)