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 class
ServerResponse.JWTClaimSet
The type Jwt claim set.
public class
ServerResponse.DocumentError
The type Document error.
-
Field Summary
Fields Modifier and Type Field Description public final String
version
public final List<ServerResponse.JWTClaimSet>
documents
public final List<ServerResponse.DocumentError>
documentErrors
public final Array<byte>
rawBytes
-
Method Summary
Modifier and Type Method Description String
getVersion()
Gets version. List<ServerResponse.JWTClaimSet>
getDocuments()
Gets documents. List<ServerResponse.DocumentError>
getDocumentErrors()
Gets document errors. Array<byte>
getRawBytes()
Get raw bytes byte [ ]. static ServerResponse
fromJson(@NonNull() String jsonStr)
From json server response. static ServerResponse
fromBytes(@NonNull() Array<byte> bytes)
From bytes server response. String
toString()
-
-
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
-
-
-
-