java.lang.Object
org.elasticsearch.xpack.core.ml.calendars.Calendar
All Implemented Interfaces:
Writeable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class Calendar extends Object implements org.elasticsearch.xcontent.ToXContentObject, Writeable
A simple calendar object for scheduled (special) events. The calendar consists of a name an a list of job Ids or job groups.
  • Field Details

    • CALENDAR_TYPE

      public static final String CALENDAR_TYPE
      See Also:
    • TYPE

      public static final org.elasticsearch.xcontent.ParseField TYPE
    • JOB_IDS

      public static final org.elasticsearch.xcontent.ParseField JOB_IDS
    • ID

      public static final org.elasticsearch.xcontent.ParseField ID
    • DESCRIPTION

      public static final org.elasticsearch.xcontent.ParseField DESCRIPTION
    • RESULTS_FIELD

      public static final org.elasticsearch.xcontent.ParseField RESULTS_FIELD
    • STRICT_PARSER

      public static final org.elasticsearch.xcontent.ObjectParser<Calendar.Builder,Void> STRICT_PARSER
    • LENIENT_PARSER

      public static final org.elasticsearch.xcontent.ObjectParser<Calendar.Builder,Void> LENIENT_PARSER
  • Constructor Details

    • Calendar

      public Calendar(String id, List<String> jobIds, @Nullable String description)
      jobIds can be a mix of job groups and job Ids
      Parameters:
      id - The calendar Id
      jobIds - List of job Ids or job groups
      description - An optional description
    • Calendar

      public Calendar(StreamInput in) throws IOException
      Throws:
      IOException
  • Method Details

    • documentId

      public static String documentId(String calendarId)
    • getId

      public String getId()
    • documentId

      public String documentId()
    • getJobIds

      public List<String> getJobIds()
    • getDescription

      @Nullable public String getDescription()
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • builder

      public static Calendar.Builder builder()