Package org.elasticsearch.client.ml
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:
Writeable,ToXContent,ToXContentObject,TaskAwareRequest
public class PostDataRequest extends ActionRequest implements ToXContentObject
Request to post data to a Machine Learning job
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPostDataRequest.JsonBuilderClass for incrementally building a bulk document request inXContentType.JSONformatNested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.EmptyNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object> -
Field Summary
Fields Modifier and Type Field Description static ParseFieldCONTENT_TYPEstatic ConstructingObjectParser<PostDataRequest,java.lang.Void>PARSERstatic ParseFieldRESET_ENDstatic ParseFieldRESET_START -
Constructor Summary
Constructors Constructor Description PostDataRequest(java.lang.String jobId, PostDataRequest.JsonBuilder builder)Create a new PostDataRequest object referencing the passedPostDataRequest.JsonBuilderobjectPostDataRequest(java.lang.String jobId, XContentType xContentType, byte[] content)Create a new PostDataRequest object referencing the passedbyte[]contentPostDataRequest(java.lang.String jobId, XContentType xContentType, BytesReference content)Create a new PostDataRequest object -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object obj)BytesReferencegetContent()java.lang.StringgetJobId()java.lang.StringgetResetEnd()java.lang.StringgetResetStart()XContentTypegetXContentType()inthashCode()voidsetResetEnd(java.lang.String resetEnd)Specifies the end of the bucket resetting rangevoidsetResetStart(java.lang.String resetStart)Specifies the start of the bucket resetting rangeXContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)ActionRequestValidationExceptionvalidate()Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddressMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Field Details
-
Constructor Details
-
PostDataRequest
Create a new PostDataRequest object- Parameters:
jobId- non-null jobId of the job to post data toxContentType- content type of the data to post. OnlyXContentType.JSONorXContentType.SMILEare supportedcontent- bulk serialized content in the format of the passedXContentType
-
PostDataRequest
Create a new PostDataRequest object referencing the passedbyte[]content- Parameters:
jobId- non-null jobId of the job to post data toxContentType- content type of the data to post. OnlyXContentType.JSONorXContentType.SMILEare supportedcontent- bulk serialized content in the format of the passedXContentType
-
PostDataRequest
Create a new PostDataRequest object referencing the passedPostDataRequest.JsonBuilderobject- Parameters:
jobId- non-null jobId of the job to post data tobuilder-PostDataRequest.JsonBuilderobject containing documents to be serialized and sent inXContentType.JSONformat
-
-
Method Details
-
getJobId
public java.lang.String getJobId() -
getResetStart
public java.lang.String getResetStart() -
setResetStart
public void setResetStart(java.lang.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 java.lang.String getResetEnd() -
setResetEnd
public void setResetEnd(java.lang.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
-
getXContentType
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
validate
- Specified by:
validatein classActionRequest
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-