Enum Class ChatEphemeralTimer

java.lang.Object
java.lang.Enum<ChatEphemeralTimer>
it.auties.whatsapp.model.chat.ChatEphemeralTimer
All Implemented Interfaces:
Serializable, Comparable<ChatEphemeralTimer>, Constable

public enum ChatEphemeralTimer extends Enum<ChatEphemeralTimer>
Enum representing the ChatEphemeralTimer period. Each constant is associated with a specific duration period.
  • Enum Constant Details

    • OFF

      public static final ChatEphemeralTimer OFF
      ChatEphemeralTimer with duration of 0 days.
    • ONE_DAY

      public static final ChatEphemeralTimer ONE_DAY
      ChatEphemeralTimer with duration of 1 day.
    • ONE_WEEK

      public static final ChatEphemeralTimer ONE_WEEK
      ChatEphemeralTimer with duration of 7 days.
    • THREE_MONTHS

      public static final ChatEphemeralTimer THREE_MONTHS
      ChatEphemeralTimer with duration of 90 days.
  • Field Details

    • period

      private final Duration period
      Getter for the duration period
  • Constructor Details

    • ChatEphemeralTimer

      private ChatEphemeralTimer(Duration period)
  • Method Details

    • values

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

      public static ChatEphemeralTimer valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null
    • ofProtobuf

      public static ChatEphemeralTimer ofProtobuf(int value)
    • of

      public static ChatEphemeralTimer of(long value)
      Factory method for creating a ChatEphemeralTimer instance based on the specified value.
      Parameters:
      value - the value to use for creating the ChatEphemeralTimer
      Returns:
      the ChatEphemeralTimer instance that matches the specified value
    • periodSeconds

      public int periodSeconds()
    • period

      public Duration period()
      Getter for the duration period