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 classSchedule.Builderstatic classSchedule.KindSchedulevariant 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.Stringcron()Get thecronvariant value.DailyScheduledaily()Get thedailyvariant value.HourlySchedulehourly()Get thehourlyvariant value.Timeinterval()Get theintervalvariant value.booleanisCron()Is this variant instance of kindcron?booleanisDaily()Is this variant instance of kinddaily?booleanisHourly()Is this variant instance of kindhourly?booleanisInterval()Is this variant instance of kindinterval?booleanisMonthly()Is this variant instance of kindmonthly?booleanisWeekly()Is this variant instance of kindweekly?booleanisYearly()Is this variant instance of kindyearly?java.util.List<TimeOfMonth>monthly()Get themonthlyvariant value.static Scheduleof(java.util.function.Function<Schedule.Builder,ObjectBuilder<Schedule>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupScheduleDeserializer(ObjectDeserializer<Schedule.Builder> op)java.lang.StringtoString()java.util.List<TimeOfWeek>weekly()Get theweeklyvariant value.java.util.List<TimeOfYear>yearly()Get theyearlyvariant value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface co.elastic.clients.elasticsearch.watcher.TriggerVariant
_toTrigger
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
Schedule
-
-
Method Details
-
_triggerKind
Trigger variant kind.- Specified by:
_triggerKindin interfaceTriggerVariant
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<Schedule.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin 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 thecronvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thecronkind.
-
isDaily
public boolean isDaily()Is this variant instance of kinddaily? -
daily
Get thedailyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thedailykind.
-
isHourly
public boolean isHourly()Is this variant instance of kindhourly? -
hourly
Get thehourlyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thehourlykind.
-
isInterval
public boolean isInterval()Is this variant instance of kindinterval? -
interval
Get theintervalvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theintervalkind.
-
isMonthly
public boolean isMonthly()Is this variant instance of kindmonthly? -
monthly
Get themonthlyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of themonthlykind.
-
isWeekly
public boolean isWeekly()Is this variant instance of kindweekly? -
weekly
Get theweeklyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theweeklykind.
-
isYearly
public boolean isYearly()Is this variant instance of kindyearly? -
yearly
Get theyearlyvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of theyearlykind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setupScheduleDeserializer
-