Package org.opensearch.script.mustache
Class MultiSearchTemplateResponse.Item
- java.lang.Object
-
- org.opensearch.script.mustache.MultiSearchTemplateResponse.Item
-
- All Implemented Interfaces:
Writeable
- Enclosing class:
- MultiSearchTemplateResponse
public static class MultiSearchTemplateResponse.Item extends java.lang.Object implements Writeable
A search template response item, holding the actual search template response, or an error message if it failed.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.opensearch.common.io.stream.Writeable
Writeable.Reader<V extends java.lang.Object>, Writeable.Writer<V extends java.lang.Object>
-
-
Constructor Summary
Constructors Constructor Description Item(SearchTemplateResponse response, java.lang.Exception exception)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ExceptiongetFailure()java.lang.StringgetFailureMessage()The actual failure message, null if its not a failure.SearchTemplateResponsegetResponse()The actual search response, null if its a failure.booleanisFailure()Is it a failed search?java.lang.StringtoString()voidwriteTo(StreamOutput out)
-
-
-
Constructor Detail
-
Item
public Item(SearchTemplateResponse response, java.lang.Exception exception)
-
-
Method Detail
-
isFailure
public boolean isFailure()
Is it a failed search?
-
getFailureMessage
@Nullable public java.lang.String getFailureMessage()
The actual failure message, null if its not a failure.
-
getResponse
@Nullable public SearchTemplateResponse getResponse()
The actual search response, null if its a failure.
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
-
getFailure
public java.lang.Exception getFailure()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-