Record Class ApiError
java.lang.Object
java.lang.Record
io.stargate.sgv2.api.common.exception.model.dto.ApiError
- Record Components:
description- A human-readable description of the error state.code- The internal number referencing the error state.grpcStatus- Status of a GRPC call, if this fails.internalTxId- The internal tracking number of the request.
public record ApiError(String description, int code, String grpcStatus, String internalTxId)
extends Record
Record for representing the API error.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcode()Returns the value of thecoderecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegrpcStatusrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theinternalTxIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ApiError
-
ApiError
-
ApiError
-
ApiError
Creates an instance of aApiErrorrecord class.- Parameters:
description- the value for thedescriptionrecord componentcode- the value for thecoderecord componentgrpcStatus- the value for thegrpcStatusrecord componentinternalTxId- the value for theinternalTxIdrecord component
-
-
Method Details
-
toString
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()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
code
public int code()Returns the value of thecoderecord component.- Returns:
- the value of the
coderecord component
-
grpcStatus
Returns the value of thegrpcStatusrecord component.- Returns:
- the value of the
grpcStatusrecord component
-
internalTxId
Returns the value of theinternalTxIdrecord component.- Returns:
- the value of the
internalTxIdrecord component
-