Class Schedule
java.lang.Object
co.elastic.clients.elasticsearch.watcher.Schedule
- All Implemented Interfaces:
TriggerVariant
,JsonpSerializable
,TaggedUnion<java.lang.Object>
,UnionVariant
@JsonpDeserializable public class Schedule extends java.lang.Object implements TaggedUnion<java.lang.Object>, TriggerVariant, JsonpSerializable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Schedule.Builder
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<Schedule>
_DESERIALIZER
static java.lang.String
CRON
static java.lang.String
DAILY
static java.lang.String
HOURLY
static java.lang.String
INTERVAL
static java.lang.String
MONTHLY
static java.lang.String
WEEKLY
static java.lang.String
YEARLY
-
Constructor Summary
Constructors Constructor Description Schedule(ScheduleVariant value)
Schedule(ObjectBuilder<T> builder)
Schedule(java.util.function.Function<Schedule.Builder,Schedule.Builder> fn)
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
java.lang.String
_type()
Get the of the type of the variant held by this union object.java.lang.String
_variantType()
Trigger
variant typejava.lang.String
cron()
Get thecron
variant value.DailySchedule
daily()
Get thedaily
variant value.HourlySchedule
hourly()
Get thehourly
variant value.java.lang.String
interval()
Get theinterval
variant value.java.util.List<TimeOfMonth>
monthly()
Get themonthly
variant value.void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
protected static void
setupScheduleDeserializer(DelegatingDeserializer<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.util.TaggedUnion
_is
Methods inherited from interface co.elastic.clients.elasticsearch.watcher.TriggerVariant
_toTrigger
-
Field Details
-
CRON
public static final java.lang.String CRON- See Also:
- Constant Field Values
-
DAILY
public static final java.lang.String DAILY- See Also:
- Constant Field Values
-
HOURLY
public static final java.lang.String HOURLY- See Also:
- Constant Field Values
-
INTERVAL
public static final java.lang.String INTERVAL- See Also:
- Constant Field Values
-
MONTHLY
public static final java.lang.String MONTHLY- See Also:
- Constant Field Values
-
WEEKLY
public static final java.lang.String WEEKLY- See Also:
- Constant Field Values
-
YEARLY
public static final java.lang.String YEARLY- See Also:
- Constant Field Values
-
_DESERIALIZER
-
-
Constructor Details
-
Schedule
-
Schedule
-
Schedule
-
-
Method Details
-
_variantType
public java.lang.String _variantType()Trigger
variant type- Specified by:
_variantType
in interfaceUnionVariant
-
_type
public java.lang.String _type()Description copied from interface:TaggedUnion
Get the of the type of the variant held by this union object.- Specified by:
_type
in interfaceTaggedUnion<java.lang.Object>
- Returns:
- the variant type
-
_get
public java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<java.lang.Object>
-
cron
public java.lang.String cron()Get thecron
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thecron
kind.
-
daily
Get thedaily
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thedaily
kind.
-
hourly
Get thehourly
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thehourly
kind.
-
interval
public java.lang.String interval()Get theinterval
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theinterval
kind.
-
monthly
Get themonthly
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of themonthly
kind.
-
weekly
Get theweekly
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of theweekly
kind.
-
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
-