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.withCanMentionGroup
(long oldGroupId, long newGroupId) Sets the optional ID of the user group whose members are allowed to mention the new user 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
-
Field Details
-
NAME
- See Also:
-
DESCRIPTION
- See Also:
-
CAN_MENTION_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
Sets the optional ID of the user group whose members are allowed to mention the new user group.- Parameters:
oldGroupId
- The current ID of the user group whose members are allowed to mention the new user groupnewGroupId
- The new ID of the user group whose members are allowed to mention the new user 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
-