Class ScheduledInstanceRecurrence
- java.lang.Object
-
- com.amazonaws.services.ec2.model.ScheduledInstanceRecurrence
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ScheduledInstanceRecurrence extends Object implements Serializable, Cloneable
Describes the recurring schedule for a Scheduled Instance.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ScheduledInstanceRecurrence()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduledInstanceRecurrence
clone()
boolean
equals(Object obj)
String
getFrequency()
The frequency (Daily
,Weekly
, orMonthly
).Integer
getInterval()
The interval quantity.List<Integer>
getOccurrenceDaySet()
The days.Boolean
getOccurrenceRelativeToEnd()
Indicates whether the occurrence is relative to the end of the specified week or month.String
getOccurrenceUnit()
The unit foroccurrenceDaySet
(DayOfWeek
orDayOfMonth
).int
hashCode()
Boolean
isOccurrenceRelativeToEnd()
Indicates whether the occurrence is relative to the end of the specified week or month.void
setFrequency(String frequency)
The frequency (Daily
,Weekly
, orMonthly
).void
setInterval(Integer interval)
The interval quantity.void
setOccurrenceDaySet(Collection<Integer> occurrenceDaySet)
The days.void
setOccurrenceRelativeToEnd(Boolean occurrenceRelativeToEnd)
Indicates whether the occurrence is relative to the end of the specified week or month.void
setOccurrenceUnit(String occurrenceUnit)
The unit foroccurrenceDaySet
(DayOfWeek
orDayOfMonth
).String
toString()
Returns a string representation of this object; useful for testing and debugging.ScheduledInstanceRecurrence
withFrequency(String frequency)
The frequency (Daily
,Weekly
, orMonthly
).ScheduledInstanceRecurrence
withInterval(Integer interval)
The interval quantity.ScheduledInstanceRecurrence
withOccurrenceDaySet(Integer... occurrenceDaySet)
The days.ScheduledInstanceRecurrence
withOccurrenceDaySet(Collection<Integer> occurrenceDaySet)
The days.ScheduledInstanceRecurrence
withOccurrenceRelativeToEnd(Boolean occurrenceRelativeToEnd)
Indicates whether the occurrence is relative to the end of the specified week or month.ScheduledInstanceRecurrence
withOccurrenceUnit(String occurrenceUnit)
The unit foroccurrenceDaySet
(DayOfWeek
orDayOfMonth
).
-
-
-
Method Detail
-
setFrequency
public void setFrequency(String frequency)
The frequency (
Daily
,Weekly
, orMonthly
).- Parameters:
frequency
- The frequency (Daily
,Weekly
, orMonthly
).
-
getFrequency
public String getFrequency()
The frequency (
Daily
,Weekly
, orMonthly
).- Returns:
- The frequency (
Daily
,Weekly
, orMonthly
).
-
withFrequency
public ScheduledInstanceRecurrence withFrequency(String frequency)
The frequency (
Daily
,Weekly
, orMonthly
).- Parameters:
frequency
- The frequency (Daily
,Weekly
, orMonthly
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setInterval
public void setInterval(Integer interval)
The interval quantity. The interval unit depends on the value of
frequency
. For example, every 2 weeks or every 2 months.- Parameters:
interval
- The interval quantity. The interval unit depends on the value offrequency
. For example, every 2 weeks or every 2 months.
-
getInterval
public Integer getInterval()
The interval quantity. The interval unit depends on the value of
frequency
. For example, every 2 weeks or every 2 months.- Returns:
- The interval quantity. The interval unit depends on the value of
frequency
. For example, every 2 weeks or every 2 months.
-
withInterval
public ScheduledInstanceRecurrence withInterval(Integer interval)
The interval quantity. The interval unit depends on the value of
frequency
. For example, every 2 weeks or every 2 months.- Parameters:
interval
- The interval quantity. The interval unit depends on the value offrequency
. For example, every 2 weeks or every 2 months.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getOccurrenceDaySet
public List<Integer> getOccurrenceDaySet()
The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
- Returns:
- The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
-
setOccurrenceDaySet
public void setOccurrenceDaySet(Collection<Integer> occurrenceDaySet)
The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
- Parameters:
occurrenceDaySet
- The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
-
withOccurrenceDaySet
public ScheduledInstanceRecurrence withOccurrenceDaySet(Integer... occurrenceDaySet)
The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
NOTE: This method appends the values to the existing list (if any). Use
setOccurrenceDaySet(java.util.Collection)
orwithOccurrenceDaySet(java.util.Collection)
if you want to override the existing values.- Parameters:
occurrenceDaySet
- The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withOccurrenceDaySet
public ScheduledInstanceRecurrence withOccurrenceDaySet(Collection<Integer> occurrenceDaySet)
The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).
- Parameters:
occurrenceDaySet
- The days. For a monthly schedule, this is one or more days of the month (1-31). For a weekly schedule, this is one or more days of the week (1-7, where 1 is Sunday).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setOccurrenceRelativeToEnd
public void setOccurrenceRelativeToEnd(Boolean occurrenceRelativeToEnd)
Indicates whether the occurrence is relative to the end of the specified week or month.
- Parameters:
occurrenceRelativeToEnd
- Indicates whether the occurrence is relative to the end of the specified week or month.
-
getOccurrenceRelativeToEnd
public Boolean getOccurrenceRelativeToEnd()
Indicates whether the occurrence is relative to the end of the specified week or month.
- Returns:
- Indicates whether the occurrence is relative to the end of the specified week or month.
-
withOccurrenceRelativeToEnd
public ScheduledInstanceRecurrence withOccurrenceRelativeToEnd(Boolean occurrenceRelativeToEnd)
Indicates whether the occurrence is relative to the end of the specified week or month.
- Parameters:
occurrenceRelativeToEnd
- Indicates whether the occurrence is relative to the end of the specified week or month.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
isOccurrenceRelativeToEnd
public Boolean isOccurrenceRelativeToEnd()
Indicates whether the occurrence is relative to the end of the specified week or month.
- Returns:
- Indicates whether the occurrence is relative to the end of the specified week or month.
-
setOccurrenceUnit
public void setOccurrenceUnit(String occurrenceUnit)
The unit for
occurrenceDaySet
(DayOfWeek
orDayOfMonth
).- Parameters:
occurrenceUnit
- The unit foroccurrenceDaySet
(DayOfWeek
orDayOfMonth
).
-
getOccurrenceUnit
public String getOccurrenceUnit()
The unit for
occurrenceDaySet
(DayOfWeek
orDayOfMonth
).- Returns:
- The unit for
occurrenceDaySet
(DayOfWeek
orDayOfMonth
).
-
withOccurrenceUnit
public ScheduledInstanceRecurrence withOccurrenceUnit(String occurrenceUnit)
The unit for
occurrenceDaySet
(DayOfWeek
orDayOfMonth
).- Parameters:
occurrenceUnit
- The unit foroccurrenceDaySet
(DayOfWeek
orDayOfMonth
).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toString
in classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public ScheduledInstanceRecurrence clone()
-
-