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

public class UpdateUserGroupApiRequest extends ZulipApiRequest implements VoidExecutableApiRequest
Zulip API request builder for updating a user group.
See Also:
  • Field Details

  • Constructor Details

    • UpdateUserGroupApiRequest

      public UpdateUserGroupApiRequest(ZulipHttpClient client, long groupId)
      Parameters:
      client - The Zulip HTTP client
      groupId - The id of the group to update
    • UpdateUserGroupApiRequest

      public UpdateUserGroupApiRequest(ZulipHttpClient client, String name, String description, long groupId)
      Parameters:
      client - The Zulip HTTP client
      name - The updated name of the user group
      description - The updated description of the user group
      groupId - The id of the group to update
  • Method Details

    • withDescription

      public UpdateUserGroupApiRequest withDescription(String description)
      Sets the updated description of the user group.
      Parameters:
      description - The new description of the user group
      Returns:
      This UpdateUserGroupApiRequest instance
    • withName

      public UpdateUserGroupApiRequest withName(String name)
      Sets the updated name of the user group.
      Parameters:
      name - The new name of the user group
      Returns:
      This UpdateUserGroupApiRequest instance
    • withCanMentionGroup

      public UpdateUserGroupApiRequest withCanMentionGroup(long oldGroupId, long newGroupId)
      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 group
      newGroupId - The new ID of the user group whose members are allowed to mention the new user group
      Returns:
      This UpdateUserGroupApiRequest instance
    • execute

      public void execute() throws ZulipClientException
      Executes the Zulip API request for updating a user group.
      Specified by:
      execute in interface VoidExecutableApiRequest
      Throws:
      ZulipClientException - if the request was not successful