public class VasPayloadElement extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
VasPayloadElement.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<VasPayloadElement> |
CREATOR |
static JSONifiable.Creator<VasPayloadElement> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
VasPayloadElement()
Constructs a new empty instance.
|
protected |
VasPayloadElement(boolean noInit)
Constructs a new empty instance.
|
|
VasPayloadElement(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
VasPayloadElement(String json)
Constructs a new instance from the given JSON String.
|
|
VasPayloadElement(VasPayloadElement src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearDataType()
Clears the 'dataType' field, the 'has' method for this field will now return false
|
void |
clearMerchantId()
Clears the 'merchantId' field, the 'has' method for this field will now return false
|
void |
clearProtocolId()
Clears the 'protocolId' field, the 'has' method for this field will now return false
|
void |
clearResponseFormat()
Clears the 'responseFormat' field, the 'has' method for this field will now return false
|
void |
clearVasData()
Clears the 'vasData' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
VasPayloadElement |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
VasDataType |
getDataType()
Indicates the type of data in this response.
|
protected GenericClient |
getGenericClient() |
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
String |
getMerchantId()
Merchant id associated with this payload element (hex encoded)
|
VasProtocol |
getProtocolId()
Protocol this payload element was derived from
|
VasResponseFormat |
getResponseFormat()
Format of vasData payload.
|
String |
getVasData()
Vas data.
|
boolean |
hasDataType()
Checks whether the 'dataType' field has been set, however the value could be null
|
boolean |
hasMerchantId()
Checks whether the 'merchantId' field has been set, however the value could be null
|
boolean |
hasProtocolId()
Checks whether the 'protocolId' field has been set, however the value could be null
|
boolean |
hasResponseFormat()
Checks whether the 'responseFormat' field has been set, however the value could be null
|
boolean |
hasVasData()
Checks whether the 'vasData' field has been set, however the value could be null
|
boolean |
isNotNullDataType()
Checks whether the 'dataType' field is set and is not null
|
boolean |
isNotNullMerchantId()
Checks whether the 'merchantId' field is set and is not null
|
boolean |
isNotNullProtocolId()
Checks whether the 'protocolId' field is set and is not null
|
boolean |
isNotNullResponseFormat()
Checks whether the 'responseFormat' field is set and is not null
|
boolean |
isNotNullVasData()
Checks whether the 'vasData' field is set and is not null
|
void |
mergeChanges(VasPayloadElement src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
VasPayloadElement |
setDataType(VasDataType dataType)
Sets the field 'dataType'.
|
VasPayloadElement |
setMerchantId(String merchantId)
Sets the field 'merchantId'.
|
VasPayloadElement |
setProtocolId(VasProtocol protocolId)
Sets the field 'protocolId'.
|
VasPayloadElement |
setResponseFormat(VasResponseFormat responseFormat)
Sets the field 'responseFormat'.
|
VasPayloadElement |
setVasData(String vasData)
Sets the field 'vasData'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<VasPayloadElement> CREATOR
public static final JSONifiable.Creator<VasPayloadElement> JSON_CREATOR
public VasPayloadElement()
protected VasPayloadElement(boolean noInit)
public VasPayloadElement(String json) throws IllegalArgumentException
IllegalArgumentException
public VasPayloadElement(JSONObject jsonObject)
public VasPayloadElement(VasPayloadElement src)
public VasDataType getDataType()
public VasResponseFormat getResponseFormat()
public String getVasData()
public VasProtocol getProtocolId()
public String getMerchantId()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullDataType()
public boolean isNotNullResponseFormat()
public boolean isNotNullVasData()
public boolean isNotNullProtocolId()
public boolean isNotNullMerchantId()
public boolean hasDataType()
public boolean hasResponseFormat()
public boolean hasVasData()
public boolean hasProtocolId()
public boolean hasMerchantId()
public VasPayloadElement setDataType(VasDataType dataType)
public VasPayloadElement setResponseFormat(VasResponseFormat responseFormat)
public VasPayloadElement setVasData(String vasData)
public VasPayloadElement setProtocolId(VasProtocol protocolId)
public VasPayloadElement setMerchantId(String merchantId)
public void clearDataType()
public void clearResponseFormat()
public void clearVasData()
public void clearProtocolId()
public void clearMerchantId()
public boolean containsChanges()
public void resetChangeLog()
public VasPayloadElement copyChanges()
public void mergeChanges(VasPayloadElement src)