Class CreateUserGroupApiRequest
java.lang.Object
com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
com.github.jamesnetherton.zulip.client.api.user.request.CreateUserGroupApiRequest
- All Implemented Interfaces:
VoidExecutableApiRequest
Zulip API request builder for creating a user to a group.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreateUserGroupApiRequest(ZulipHttpClient client, String name, String description, long... userIds) Constructs aCreateUserGroupApiRequest. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Executes the Zulip API request for adding creating 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 groupId) 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.Methods inherited from class com.github.jamesnetherton.zulip.client.api.core.ZulipApiRequest
client, getParam, getParam, getParams, putParam, putParamAsJsonString, putParamAsWrappedObject
-
Field Details
-
NAME
- See Also:
-
DESCRIPTION
- See Also:
-
MEMBERS
- 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
-
CreateUserGroupApiRequest
public CreateUserGroupApiRequest(ZulipHttpClient client, String name, String description, long... userIds) Constructs aCreateUserGroupApiRequest.- Parameters:
client- The Zulip HTTP clientname- The name of the user groupdescription- The user group descriptionuserIds- Array of user ids to add to the group
-
-
Method Details
-
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:
groupId- The ID of the user group whose members are allowed to mention the new user group- Returns:
- This
CreateUserGroupApiRequestinstance
-
withCanMentionGroup
Sets the users who have permission to mention this group.- Parameters:
userGroupSetting- TheUserGroupSettingfor users who have permission to mention this group- Returns:
- This
CreateUserGroupApiRequestinstance
-
withCanAddMembersGroup
Sets the users who have permission to add members to this group.- Parameters:
userGroupSetting- TheUserGroupSettingfor users who have permission to add members to this group- Returns:
- This
CreateUserGroupApiRequestinstance
-
withCanJoinMembersGroup
Sets the users who have permission to join this group.- Parameters:
userGroupSetting- TheUserGroupSettingfor users who have permission to join this group- Returns:
- This
CreateUserGroupApiRequestinstance
-
withCanLeaveGroup
Sets the users who have permission to leave this group.- Parameters:
userGroupSetting- TheUserGroupSettingfor users who have permission to leave this group- Returns:
- This
CreateUserGroupApiRequestinstance
-
withCanManageGroup
Sets the users who have permission to manage this group.- Parameters:
userGroupSetting- TheUserGroupSettingfor users who have permission to manage this group- Returns:
- This
CreateUserGroupApiRequestinstance
-
withCanRemoveMembersGroup
Sets the users who have permission to remove members from this group.- Parameters:
userGroupSetting- TheUserGroupSettingfor users who have permission to remove members from this group- Returns:
- This
CreateUserGroupApiRequestinstance
-
execute
Executes the Zulip API request for adding creating a user group.- Specified by:
executein interfaceVoidExecutableApiRequest- Throws:
ZulipClientException- if the request was not successful
-
withCanMentionGroup(UserGroupSetting)