Interface NCTestResult
-
public interface NCTestResult
Result of the test sentence processing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description String
getIntentId()
Gets ID of the intent that was matched against the input sentence.String
getModelId()
Gets model ID the test sentence was sent with.long
getProcessingTime()
Gets total sentence processing time in milliseconds.Optional<String>
getResult()
Gets optional execution result.Optional<String>
getResultError()
Gets optional execution error.Optional<String>
getResultType()
Gets optional execution result type.String
getText()
Gets test sentence text.default boolean
isFailed()
Tests whether or not this result corresponds to a failed execution.default boolean
isOk()
Tests whether or not this result corresponds to a successful execution.
-
-
-
Method Detail
-
getText
String getText()
Gets test sentence text.- Returns:
- Test sentence text.
-
getProcessingTime
long getProcessingTime()
Gets total sentence processing time in milliseconds.- Returns:
- Processing time in milliseconds.
-
getModelId
String getModelId()
Gets model ID the test sentence was sent with.- Returns:
- Model ID.
-
getResult
Optional<String> getResult()
Gets optional execution result. Only provided if processing succeeded.- Returns:
- Optional execution result.
- See Also:
isFailed()
,isOk()
-
getResultType
Optional<String> getResultType()
Gets optional execution result type. Only provided if processing succeeded.- Returns:
- Optional execution result type.
- See Also:
isFailed()
,isOk()
-
getResultError
Optional<String> getResultError()
Gets optional execution error. Only provided if processing failed.- Returns:
- Optional execution error.
- See Also:
isFailed()
,isOk()
-
isFailed
default boolean isFailed()
Tests whether or not this result corresponds to a failed execution. This is identical to:return getResultError().isPresent();
- Returns:
true
if result corresponds to a failed execution,false
otherwise.
-
isOk
default boolean isOk()
Tests whether or not this result corresponds to a successful execution. This is identical to:return getResult().isPresent() && getResultType().isPresent();
- Returns:
true
if result corresponds to a successful execution,false
otherwise.
-
-