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:
org.elasticsearch.common.io.stream.Writeable
,org.elasticsearch.common.util.concurrent.RefCounted
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
,org.elasticsearch.tasks.TaskAwareRequest
public class PostDataRequest
extends org.elasticsearch.action.ActionRequest
implements org.elasticsearch.common.xcontent.ToXContentObject
Request to post data to a Machine Learning job
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PostDataRequest.JsonBuilder
Class for incrementally building a bulk document request inXContentType.JSON
formatNested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
org.elasticsearch.transport.TransportRequest.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
org.elasticsearch.common.io.stream.Writeable.Reader<V extends java.lang.Object>, org.elasticsearch.common.io.stream.Writeable.Writer<V extends java.lang.Object>
-
Field Summary
Fields Modifier and Type Field Description static org.elasticsearch.common.ParseField
CONTENT_TYPE
static org.elasticsearch.common.xcontent.ConstructingObjectParser<PostDataRequest,java.lang.Void>
PARSER
static org.elasticsearch.common.ParseField
RESET_END
static org.elasticsearch.common.ParseField
RESET_START
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors Constructor Description PostDataRequest(java.lang.String jobId, PostDataRequest.JsonBuilder builder)
Create a new PostDataRequest object referencing the passedPostDataRequest.JsonBuilder
objectPostDataRequest(java.lang.String jobId, org.elasticsearch.common.xcontent.XContentType xContentType, byte[] content)
Create a new PostDataRequest object referencing the passedbyte[]
contentPostDataRequest(java.lang.String jobId, org.elasticsearch.common.xcontent.XContentType xContentType, org.elasticsearch.common.bytes.BytesReference content)
Create a new PostDataRequest object -
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
org.elasticsearch.common.bytes.BytesReference
getContent()
java.lang.String
getJobId()
java.lang.String
getResetEnd()
java.lang.String
getResetStart()
org.elasticsearch.common.xcontent.XContentType
getXContentType()
int
hashCode()
void
setResetEnd(java.lang.String resetEnd)
Specifies the end of the bucket resetting rangevoid
setResetStart(java.lang.String resetStart)
Specifies the start of the bucket resetting rangeorg.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
org.elasticsearch.action.ActionRequestValidationException
validate()
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
decRef, incRef, remoteAddress, remoteAddress, tryIncRef
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 Details
-
RESET_START
public static final org.elasticsearch.common.ParseField RESET_START -
RESET_END
public static final org.elasticsearch.common.ParseField RESET_END -
CONTENT_TYPE
public static final org.elasticsearch.common.ParseField CONTENT_TYPE -
PARSER
public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<PostDataRequest,java.lang.Void> PARSER
-
-
Constructor Details
-
PostDataRequest
public PostDataRequest(java.lang.String jobId, org.elasticsearch.common.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 toxContentType
- content type of the data to post. OnlyXContentType.JSON
orXContentType.SMILE
are supportedcontent
- bulk serialized content in the format of the passedXContentType
-
PostDataRequest
public PostDataRequest(java.lang.String jobId, org.elasticsearch.common.xcontent.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.JSON
orXContentType.SMILE
are supportedcontent
- bulk serialized content in the format of the passedXContentType
-
PostDataRequest
Create a new PostDataRequest object referencing the passedPostDataRequest.JsonBuilder
object- Parameters:
jobId
- non-null jobId of the job to post data tobuilder
-PostDataRequest.JsonBuilder
object containing documents to be serialized and sent inXContentType.JSON
format
-
-
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
public org.elasticsearch.common.bytes.BytesReference getContent() -
getXContentType
public org.elasticsearch.common.xcontent.XContentType getXContentType() -
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
validate
public org.elasticsearch.action.ActionRequestValidationException validate()- Specified by:
validate
in classorg.elasticsearch.action.ActionRequest
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
java.io.IOException
-