Package com.scytales.mvalid.sdk.data
Class ServerResponse
-
- All Implemented Interfaces:
-
com.scytales.mvalid.sdk.data.Response
public final class ServerResponse implements Response
Presentation class for received data from server.
Construct by calling
- static method fromBytes to instantiate from received bytes or
- static method fromJson when json string response is available
ServerResponse { String version, List<JWTClaimSet> documents, List<DocumentError> documentErrors } JWTClaimSet { String docType, Map<String, ?> nameSpaces, Map<String, Map<String, Integer>> errors, String rawJwt } DocumentError { String docType, int errorCode }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classServerResponse.JWTClaimSetThe type Jwt claim set.
public classServerResponse.DocumentErrorThe type Document error.
-
Field Summary
Fields Modifier and Type Field Description public final Stringversionpublic final List<ServerResponse.JWTClaimSet>documentspublic final List<ServerResponse.DocumentError>documentErrorspublic final Array<byte>rawBytes
-
Method Summary
Modifier and Type Method Description StringgetVersion()Gets version. List<ServerResponse.JWTClaimSet>getDocuments()Gets documents. List<ServerResponse.DocumentError>getDocumentErrors()Gets document errors. Array<byte>getRawBytes()Get raw bytes byte [ ]. static ServerResponsefromJson(@NonNull() String jsonStr)From json server response. static ServerResponsefromBytes(@NonNull() Array<byte> bytes)From bytes server response. StringtoString()-
-
Method Detail
-
getVersion
@NonNull() String getVersion()
Gets version.
-
getDocuments
@NonNull() List<ServerResponse.JWTClaimSet> getDocuments()
Gets documents.
-
getDocumentErrors
@NonNull() List<ServerResponse.DocumentError> getDocumentErrors()
Gets document errors.
-
getRawBytes
@NonNull() Array<byte> getRawBytes()
Get raw bytes byte [ ].
-
fromJson
@NonNull() static ServerResponse fromJson(@NonNull() String jsonStr)
From json server response.
- Parameters:
jsonStr- the json str
-
fromBytes
@NonNull() static ServerResponse fromBytes(@NonNull() Array<byte> bytes)
From bytes server response.
- Parameters:
bytes- the bytes
-
-
-
-