Class Schedule
java.lang.Object
co.elastic.clients.elasticsearch.watcher.Schedule
- All Implemented Interfaces:
TriggerVariant
,JsonpSerializable
,TaggedUnion<Schedule.Kind,java.lang.Object>
@JsonpDeserializable public class Schedule extends java.lang.Object implements TaggedUnion<Schedule.Kind,java.lang.Object>, TriggerVariant, JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Schedule.Builder
static class
Schedule.Kind
Schedule
variant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Schedule>
_DESERIALIZER
-
Constructor Summary
Constructors Constructor Description Schedule(ScheduleVariant value)
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
Schedule.Kind
_kind()
Get the of the kind of variant held by this object.Trigger.Kind
_triggerKind()
Trigger variant kind.java.lang.String
cron()
Get thecron
variant value.DailySchedule
daily()
Get thedaily
variant value.HourlySchedule
hourly()
Get thehourly
variant value.Time
interval()
Get theinterval
variant value.boolean
isCron()
Is this variant instance of kindcron
?boolean
isDaily()
Is this variant instance of kinddaily
?boolean
isHourly()
Is this variant instance of kindhourly
?boolean
isInterval()
Is this variant instance of kindinterval
?boolean
isMonthly()
Is this variant instance of kindmonthly
?boolean
isWeekly()
Is this variant instance of kindweekly
?boolean
isYearly()
Is this variant instance of kindyearly
?java.util.List<TimeOfMonth>
monthly()
Get themonthly
variant value.static Schedule
of(java.util.function.Function<Schedule.Builder,ObjectBuilder<Schedule>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupScheduleDeserializer(ObjectDeserializer<Schedule.Builder> op)
java.util.List<TimeOfWeek>
weekly()
Get theweekly
variant value.java.util.List<TimeOfYear>
yearly()
Get theyearly
variant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface co.elastic.clients.elasticsearch.watcher.TriggerVariant
_toTrigger
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
Schedule
-
-
Method Details
-
_triggerKind
Trigger variant kind.- Specified by:
_triggerKind
in interfaceTriggerVariant
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<Schedule.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<Schedule.Kind,java.lang.Object>
-
of
public static Schedule of(java.util.function.Function<Schedule.Builder,ObjectBuilder<Schedule>> fn) -
isCron
public boolean isCron()Is this variant instance of kindcron
? -
cron
public java.lang.String cron()Get thecron
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecron
kind.
-
isDaily
public boolean isDaily()Is this variant instance of kinddaily
? -
daily
Get thedaily
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedaily
kind.
-
isHourly
public boolean isHourly()Is this variant instance of kindhourly
? -
hourly
Get thehourly
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thehourly
kind.
-
isInterval
public boolean isInterval()Is this variant instance of kindinterval
? -
interval
Get theinterval
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theinterval
kind.
-
isMonthly
public boolean isMonthly()Is this variant instance of kindmonthly
? -
monthly
Get themonthly
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of themonthly
kind.
-
isWeekly
public boolean isWeekly()Is this variant instance of kindweekly
? -
weekly
Get theweekly
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theweekly
kind.
-
isYearly
public boolean isYearly()Is this variant instance of kindyearly
? -
yearly
Get theyearly
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theyearly
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-
setupScheduleDeserializer
-