Package io.sendon.sms.request
Class Repeat
java.lang.Object
io.sendon.sms.request.Repeat
Represents the repeat configuration for a scheduled message.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanintint -
Constructor Summary
ConstructorsConstructorDescriptionRepeat()Default constructor forRepeat.Repeat(int messageCount, Repeat.RepeatUnit unit, int interval, boolean denyNightTime) Constructs aRepeatinstance with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionsetDenyNightTime(boolean denyNightTime) Sets whether to deny sending messages at night.setInterval(int interval) Sets the interval between messages.setMessageCount(int messageCount) Sets the number of messages to send.setUnit(Repeat.RepeatUnit unit) Sets the unit of time for the interval.
-
Field Details
-
messageCount
public int messageCount -
unit
-
interval
public int interval -
denyNightTime
public boolean denyNightTime
-
-
Constructor Details
-
Repeat
public Repeat()Default constructor forRepeat. -
Repeat
Constructs aRepeatinstance 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
Sets the number of messages to send.- Parameters:
messageCount- The number of messages.- Returns:
- The current instance of
Repeat.
-
setUnit
Sets the unit of time for the interval.- Parameters:
unit- The unit of time.- Returns:
- The current instance of
Repeat.
-
setInterval
Sets the interval between messages.- Parameters:
interval- The interval.- Returns:
- The current instance of
Repeat.
-
setDenyNightTime
Sets whether to deny sending messages at night.- Parameters:
denyNightTime-trueto deny sending at night, otherwisefalse.- Returns:
- The current instance of
Repeat.
-