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.JSONformat-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static ParseFieldCONTENT_TYPEstatic ConstructingObjectParser<PostDataRequest,Void>PARSERstatic ParseFieldRESET_ENDstatic ParseFieldRESET_START-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description PostDataRequest(String jobId, PostDataRequest.JsonBuilder builder)Create a new PostDataRequest object referencing the passedPostDataRequest.JsonBuilderobjectPostDataRequest(String jobId, XContentType xContentType, byte[] content)Create a new PostDataRequest object referencing the passedbyte[]contentPostDataRequest(String jobId, XContentType xContentType, BytesReference content)Create a new PostDataRequest object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)BytesReferencegetContent()StringgetJobId()StringgetResetEnd()StringgetResetStart()XContentTypegetXContentType()inthashCode()voidsetResetEnd(String resetEnd)Specifies the end of the bucket resetting rangevoidsetResetStart(String resetStart)Specifies the start of the bucket resetting rangeXContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)ActionRequestValidationExceptionvalidate()-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult, writeTo
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Field Detail
-
RESET_START
public static final ParseField RESET_START
-
RESET_END
public static final ParseField RESET_END
-
CONTENT_TYPE
public static final ParseField CONTENT_TYPE
-
PARSER
public static final ConstructingObjectParser<PostDataRequest,Void> PARSER
-
-
Constructor Detail
-
PostDataRequest
public PostDataRequest(String jobId, XContentType xContentType, BytesReference content)
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
public PostDataRequest(String jobId, XContentType xContentType, byte[] content)
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
public PostDataRequest(String jobId, PostDataRequest.JsonBuilder builder)
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 Detail
-
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 BytesReference getContent()
-
getXContentType
public XContentType getXContentType()
-
validate
public ActionRequestValidationException validate()
- Specified by:
validatein classActionRequest
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
-