com.github.jamesnetherton.zulip.client.api.user.DesktopIconCountDisplay Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zulip-java-client Show documentation
Show all versions of zulip-java-client Show documentation
Java client for the Zulip REST API
The newest version!
package com.github.jamesnetherton.zulip.client.api.user;
import com.fasterxml.jackson.annotation.JsonCreator;
/**
* Defines desktop icon count display settings.
*/
public enum DesktopIconCountDisplay {
/**
* Display count of all unread messages.
*/
ALL_UNREADS(1),
/**
* Display count of all unread private messages, mentions and followed topics.
*/
PRIVATE_MESSAGES_MENTIONS_AND_FOLLOWED_TOPICS(2),
/**
* Display count of all unread private messages and mentions.
*/
PRIVATE_MESSAGES_AND_MENTIONS(3),
/**
* Disable displaying a count.
*/
NONE(4),
/**
* An unknown icon count display value. This usually indicates an error in the response from Zulip.
*/
UNKNOWN(0);
private final int setting;
DesktopIconCountDisplay(int setting) {
this.setting = setting;
}
public int getSetting() {
return setting;
}
@JsonCreator
public static DesktopIconCountDisplay fromInt(int setting) {
for (DesktopIconCountDisplay desktopIconCountDisplay : DesktopIconCountDisplay.values()) {
if (desktopIconCountDisplay.getSetting() == setting) {
return desktopIconCountDisplay;
}
}
return UNKNOWN;
}
}