Class PutWatchRequest

  • All Implemented Interfaces:
    Validatable

    public final class PutWatchRequest
    extends java.lang.Object
    implements Validatable
    This request class contains the data needed to create a watch along with the name of the watch. The name of the watch will become the ID of the indexed document.
    • Method Detail

      • getId

        public java.lang.String getId()
        Returns:
        The name that will be the ID of the indexed document
      • getSource

        public BytesReference getSource()
        Returns:
        The source of the watch
      • isActive

        public boolean isActive()
        Returns:
        The initial active state of the watch (defaults to true, e.g. "active")
      • setActive

        public void setActive​(boolean active)
        Sets the initial active state of the watch
      • xContentType

        public XContentType xContentType()
        Get the content type for the source
      • getVersion

        public long getVersion()
      • setVersion

        public void setVersion​(long version)
      • isValidId

        public static boolean isValidId​(java.lang.String id)