Package org.elasticsearch.client.ml
Class PreviewDatafeedResponse
- java.lang.Object
-
- org.elasticsearch.client.ml.PreviewDatafeedResponse
-
- All Implemented Interfaces:
ToXContent,ToXContentObject
public class PreviewDatafeedResponse extends Object implements ToXContentObject
Response containing a datafeed preview in JSON format
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description PreviewDatafeedResponse(BytesReference preview)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static PreviewDatafeedResponsefromXContent(XContentParser parser)List<Map<String,Object>>getDataList()Parses the preview to a list ofMapobjectsBytesReferencegetPreview()inthashCode()StringtoString()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Constructor Detail
-
PreviewDatafeedResponse
public PreviewDatafeedResponse(BytesReference preview)
-
-
Method Detail
-
fromXContent
public static PreviewDatafeedResponse fromXContent(XContentParser parser) throws IOException
- Throws:
IOException
-
getPreview
public BytesReference getPreview()
-
getDataList
public List<Map<String,Object>> getDataList() throws IOException
Parses the preview to a list ofMapobjects- Returns:
- List of previewed data
- Throws:
IOException- If there is a parsing issue with theBytesReferenceClassCastException- If casting the rawObjectentries to aMapfails
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
-