Class PostDataRequest

java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.client.ml.PostDataRequest
All Implemented Interfaces:
org.elasticsearch.common.io.stream.Writeable, org.elasticsearch.core.RefCounted, org.elasticsearch.tasks.TaskAwareRequest, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class PostDataRequest extends org.elasticsearch.action.ActionRequest implements org.elasticsearch.xcontent.ToXContentObject
Request to post data to a Machine Learning job
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Class for incrementally building a bulk document request in XContentType.JSON format

    Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest

    org.elasticsearch.transport.TransportRequest.Empty

    Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    org.elasticsearch.common.io.stream.Writeable.Reader<V extends Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final org.elasticsearch.xcontent.ParseField
     
    static final org.elasticsearch.xcontent.ConstructingObjectParser<PostDataRequest,Void>
     
    static final org.elasticsearch.xcontent.ParseField
     
    static final org.elasticsearch.xcontent.ParseField
     

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY_PARAMS
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new PostDataRequest object referencing the passed PostDataRequest.JsonBuilder object
    PostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, byte[] content)
    Create a new PostDataRequest object referencing the passed byte[] content
    PostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, org.elasticsearch.common.bytes.BytesReference content)
    Create a new PostDataRequest object
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    org.elasticsearch.common.bytes.BytesReference
     
     
     
     
    org.elasticsearch.xcontent.XContentType
     
    int
     
    void
    setResetEnd(String resetEnd)
    Specifies the end of the bucket resetting range
    void
    setResetStart(String resetStart)
    Specifies the start of the bucket resetting range
    org.elasticsearch.xcontent.XContentBuilder
    toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params)
     
    org.elasticsearch.action.ActionRequestValidationException
     

    Methods inherited from class org.elasticsearch.action.ActionRequest

    getShouldStoreResult, writeTo

    Methods inherited from class org.elasticsearch.transport.TransportRequest

    getParentTask, setParentTask, toString

    Methods inherited from class org.elasticsearch.transport.TransportMessage

    decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest

    createTask, getDescription, setParentTask

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject

    isFragment
  • Field Details

    • RESET_START

      public static final org.elasticsearch.xcontent.ParseField RESET_START
    • RESET_END

      public static final org.elasticsearch.xcontent.ParseField RESET_END
    • CONTENT_TYPE

      public static final org.elasticsearch.xcontent.ParseField CONTENT_TYPE
    • PARSER

      public static final org.elasticsearch.xcontent.ConstructingObjectParser<PostDataRequest,Void> PARSER
  • Constructor Details

    • PostDataRequest

      public PostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, org.elasticsearch.common.bytes.BytesReference content)
      Create a new PostDataRequest object
      Parameters:
      jobId - non-null jobId of the job to post data to
      xContentType - content type of the data to post. Only XContentType.JSON or XContentType.SMILE are supported
      content - bulk serialized content in the format of the passed XContentType
    • PostDataRequest

      public PostDataRequest(String jobId, org.elasticsearch.xcontent.XContentType xContentType, byte[] content)
      Create a new PostDataRequest object referencing the passed byte[] content
      Parameters:
      jobId - non-null jobId of the job to post data to
      xContentType - content type of the data to post. Only XContentType.JSON or XContentType.SMILE are supported
      content - bulk serialized content in the format of the passed XContentType
    • PostDataRequest

      public PostDataRequest(String jobId, PostDataRequest.JsonBuilder builder)
      Create a new PostDataRequest object referencing the passed PostDataRequest.JsonBuilder object
      Parameters:
      jobId - non-null jobId of the job to post data to
      builder - PostDataRequest.JsonBuilder object containing documents to be serialized and sent in XContentType.JSON format
  • Method Details

    • getJobId

      public String getJobId()
    • getResetStart

      public String getResetStart()
    • setResetStart

      public void setResetStart(String resetStart)
      Specifies the start of the bucket resetting range
      Parameters:
      resetStart - String representation of a timestamp; may be an epoch seconds, epoch millis or an ISO 8601 string
    • getResetEnd

      public String getResetEnd()
    • setResetEnd

      public void setResetEnd(String resetEnd)
      Specifies the end of the bucket resetting range
      Parameters:
      resetEnd - String representation of a timestamp; may be an epoch seconds, epoch millis or an ISO 8601 string
    • getContent

      public org.elasticsearch.common.bytes.BytesReference getContent()
    • getXContentType

      public org.elasticsearch.xcontent.XContentType getXContentType()
    • hashCode

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

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

      public org.elasticsearch.action.ActionRequestValidationException validate()
      Specified by:
      validate in class org.elasticsearch.action.ActionRequest
    • 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