Class Repeat

java.lang.Object
io.sendon.sms.request.Repeat

public class Repeat extends Object
Represents the repeat configuration for a scheduled message.
  • Field Details

    • messageCount

      public int messageCount
    • unit

      public Repeat.RepeatUnit unit
    • interval

      public int interval
    • denyNightTime

      public boolean denyNightTime
  • Constructor Details

    • Repeat

      public Repeat()
      Default constructor for Repeat.
    • Repeat

      public Repeat(int messageCount, Repeat.RepeatUnit unit, int interval, boolean denyNightTime)
      Constructs a Repeat instance with the specified parameters.
      Parameters:
      messageCount - The number of messages to send.
      unit - The unit of time for the interval.
      interval - The interval between messages.
      denyNightTime - Whether to deny sending messages at night.
  • Method Details

    • setMessageCount

      public Repeat setMessageCount(int messageCount)
      Sets the number of messages to send.
      Parameters:
      messageCount - The number of messages.
      Returns:
      The current instance of Repeat.
    • setUnit

      public Repeat setUnit(Repeat.RepeatUnit unit)
      Sets the unit of time for the interval.
      Parameters:
      unit - The unit of time.
      Returns:
      The current instance of Repeat.
    • setInterval

      public Repeat setInterval(int interval)
      Sets the interval between messages.
      Parameters:
      interval - The interval.
      Returns:
      The current instance of Repeat.
    • setDenyNightTime

      public Repeat setDenyNightTime(boolean denyNightTime)
      Sets whether to deny sending messages at night.
      Parameters:
      denyNightTime - true to deny sending at night, otherwise false.
      Returns:
      The current instance of Repeat.