Record Class InputGuardrailResult
java.lang.Object
java.lang.Record
io.quarkiverse.langchain4j.guardrails.InputGuardrailResult
- Record Components:
result
- The result of the input guardrail validation.failures
- The list of failures, empty if the validation succeeded.
- All Implemented Interfaces:
GuardrailResult<InputGuardrailResult>
@Deprecated(forRemoval=true)
public record InputGuardrailResult(GuardrailResult.Result result, String successfulText, List<InputGuardrailResult.Failure> failures)
extends Record
implements GuardrailResult<InputGuardrailResult>
Deprecated, for removal: This API element is subject to removal in a future version.
The result of the validation of an
InputGuardrail
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Deprecated, for removal: This API element is subject to removal in a future version.Nested classes/interfaces inherited from interface io.quarkiverse.langchain4j.guardrails.GuardrailResult
GuardrailResult.Result
-
Constructor Summary
ConstructorsConstructorDescriptionInputGuardrailResult
(GuardrailResult.Result result, String successfulText, List<InputGuardrailResult.Failure> failures) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aInputGuardrailResult
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether some other object is "equal to" this one.static InputGuardrailResult
failure
(List<? extends GuardrailResult.Failure> failures) Deprecated, for removal: This API element is subject to removal in a future version.failures()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thefailures
record component.Deprecated, for removal: This API element is subject to removal in a future version.final int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code value for this object.boolean
isFatal()
Deprecated, for removal: This API element is subject to removal in a future version.result()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of theresult
record component.static InputGuardrailResult
success()
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesuccessfulText
record component.static InputGuardrailResult
successWith
(String successfulText) Deprecated, for removal: This API element is subject to removal in a future version.toString()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this record class.validatedBy
(Class<? extends Guardrail> guardrailClass) Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.quarkiverse.langchain4j.guardrails.GuardrailResult
blockRetry, getFirstFailureException, hasRewrittenResult, isSuccess, successfulResult
-
Constructor Details
-
InputGuardrailResult
public InputGuardrailResult(GuardrailResult.Result result, String successfulText, List<InputGuardrailResult.Failure> failures) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aInputGuardrailResult
record class.
-
-
Method Details
-
success
Deprecated, for removal: This API element is subject to removal in a future version. -
successWith
Deprecated, for removal: This API element is subject to removal in a future version. -
failure
Deprecated, for removal: This API element is subject to removal in a future version. -
getResult
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getResult
in interfaceGuardrailResult<InputGuardrailResult>
-
isFatal
public boolean isFatal()Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isFatal
in interfaceGuardrailResult<InputGuardrailResult>
-
validatedBy
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
validatedBy
in interfaceGuardrailResult<InputGuardrailResult>
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Deprecated, for removal: This API element is subject to removal in a future version.Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Deprecated, for removal: This API element is subject to removal in a future version.Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
result
-
successfulText
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thesuccessfulText
record component.- Specified by:
successfulText
in interfaceGuardrailResult<InputGuardrailResult>
- Returns:
- the value of the
successfulText
record component
-
failures
Deprecated, for removal: This API element is subject to removal in a future version.Returns the value of thefailures
record component.- Specified by:
failures
in interfaceGuardrailResult<InputGuardrailResult>
- Returns:
- the value of the
failures
record component
-
InputGuardrailResult
instead