Record Class NuggetIntrospection.Result<T>
java.lang.Object
java.lang.Record
org.j7m.middleware.operations.api.NuggetIntrospection.Result<T>
- Type Parameters:
T- response value type- Record Components:
admitted- whether Phase 7.1 admission was accepted- whether authorization allowed this readcategory- operation categorycollectedAt- collection timestamppartial- whether optional component data is partialvalue- response value, ornullon failureerror- normalized safe error, ornullwarnings- safe warningsmetadata- safe metadata
- Enclosing class:
NuggetIntrospection
public static record NuggetIntrospection.Result<T>(boolean admitted, boolean authorized, NuggetIntrospection.Category category, Instant collectedAt, boolean partial, T value, RemoteError error, List<String> warnings, Map<String,String> metadata)
extends Record
Safe operation result envelope.
-
Constructor Summary
ConstructorsConstructorDescriptionResult(boolean admitted, boolean authorized, NuggetIntrospection.Category category, Instant collectedAt, boolean partial, T value, RemoteError error, List<String> warnings, Map<String, String> metadata) Creates immutable result metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanadmitted()Returns the value of theadmittedrecord component.booleanReturns the value of theauthorizedrecord component.category()Returns the value of thecategoryrecord component.Returns the value of thecollectedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.booleanpartial()Returns the value of thepartialrecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.warnings()Returns the value of thewarningsrecord component.
-
Constructor Details
-
Result
public Result(boolean admitted, boolean authorized, NuggetIntrospection.Category category, Instant collectedAt, boolean partial, T value, RemoteError error, List<String> warnings, Map<String, String> metadata) Creates immutable result metadata.
-
-
Method Details
-
toString
-
hashCode
-
equals
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
admitted
-
authorized
public boolean authorized()Returns the value of theauthorizedrecord component.- Returns:
- the value of the
authorizedrecord component
-
category
-
collectedAt
Returns the value of thecollectedAtrecord component.- Returns:
- the value of the
collectedAtrecord component
-
partial
-
value
-
error
-
warnings
-
metadata
-