Commit 5c7f73e8 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Add Spotlight.java

parent b7d0240d
package chat.rocket.core.models;
import com.google.auto.value.AutoValue;
import javax.annotation.Nullable;
@AutoValue
public abstract class Spotlight {
public abstract String getId();
public abstract String getName();
@Nullable
public abstract String getUsername();
@Nullable
public abstract String getStatus();
@Nullable
public abstract String getType();
@Nullable
public boolean isChannel() {
return Room.TYPE_CHANNEL.equals(getType());
}
@Nullable
public boolean isPrivate() {
return Room.TYPE_PRIVATE.equals(getType());
}
@Nullable
public boolean isDirectMessage() {
return Room.TYPE_DIRECT_MESSAGE.equals(getType());
}
public static Spotlight.Builder builder() {
return new AutoValue_Spotlight.Builder();
}
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder setId(String id);
public abstract Builder setName(String name);
public abstract Builder setUsername(String username);
public abstract Builder setStatus(String status);
public abstract Builder setType(String type);
public abstract Spotlight build();
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment