Enum StreamPostPolicy

java.lang.Object
java.lang.Enum<StreamPostPolicy>
com.github.jamesnetherton.zulip.client.api.stream.StreamPostPolicy
All Implemented Interfaces:
Serializable, Comparable<StreamPostPolicy>

public enum StreamPostPolicy extends Enum<StreamPostPolicy>
Defines the stream post policy.
  • Enum Constant Details

    • ANY

      public static final StreamPostPolicy ANY
      Any user can post to the stream.
    • ADMIN_ONLY

      public static final StreamPostPolicy ADMIN_ONLY
      Only administrators can post to the stream.
    • NEW_MEMBERS_ONLY

      public static final StreamPostPolicy NEW_MEMBERS_ONLY
      Only new members can post to the stream.
    • UNKNOWN

      public static final StreamPostPolicy UNKNOWN
      An unknown post policy. This usually indicates an error in the response from Zulip.
  • Method Details

    • values

      public static StreamPostPolicy[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StreamPostPolicy valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getId

      public int getId()
    • fromInt

      public static StreamPostPolicy fromInt(int policy)