public class DeviceAccessory extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
DeviceAccessory.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<DeviceAccessory> |
CREATOR |
static JSONifiable.Creator<DeviceAccessory> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
DeviceAccessory()
Constructs a new empty instance.
|
protected |
DeviceAccessory(boolean noInit)
Constructs a new empty instance.
|
|
DeviceAccessory(DeviceAccessory src)
Constructs a new instance that is a deep copy of the source instance.
|
|
DeviceAccessory(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.
|
|
DeviceAccessory(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAssociatedDevice()
Clears the 'associatedDevice' field, the 'has' method for this field will now return false
|
void |
clearBuildType()
Clears the 'buildType' field, the 'has' method for this field will now return false
|
void |
clearCpuId()
Clears the 'cpuId' field, the 'has' method for this field will now return false
|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearCurrentRom()
Clears the 'currentRom' field, the 'has' method for this field will now return false
|
void |
clearDeviceType()
Clears the 'deviceType' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearModel()
Clears the 'model' field, the 'has' method for this field will now return false
|
void |
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
|
void |
clearPedCertificate()
Clears the 'pedCertificate' field, the 'has' method for this field will now return false
|
void |
clearSecureReports()
Clears the 'secureReports' field, the 'has' method for this field will now return false
|
void |
clearSerial()
Clears the 'serial' field, the 'has' method for this field will now return false
|
void |
clearVersionCode()
Clears the 'versionCode' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
DeviceAccessory |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Reference |
getAssociatedDevice()
The device that this accessory is currently connected to, a 128-bit UUID, not a normal base-13 Clover ID.
|
DeviceAccessoryBuildType |
getBuildType() |
String |
getCpuId() |
Long |
getCreatedTime() |
Reference |
getCurrentRom() |
Reference |
getDeviceType() |
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
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 |
getModel() |
Long |
getModifiedTime() |
String |
getPedCertificate() |
List<Reference> |
getSecureReports() |
String |
getSerial()
The accessories' serial number.
|
Long |
getVersionCode() |
boolean |
hasAssociatedDevice()
Checks whether the 'associatedDevice' field has been set, however the value could be null
|
boolean |
hasBuildType()
Checks whether the 'buildType' field has been set, however the value could be null
|
boolean |
hasCpuId()
Checks whether the 'cpuId' field has been set, however the value could be null
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasCurrentRom()
Checks whether the 'currentRom' field has been set, however the value could be null
|
boolean |
hasDeviceType()
Checks whether the 'deviceType' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasModel()
Checks whether the 'model' field has been set, however the value could be null
|
boolean |
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
|
boolean |
hasPedCertificate()
Checks whether the 'pedCertificate' field has been set, however the value could be null
|
boolean |
hasSecureReports()
Checks whether the 'secureReports' field has been set, however the value could be null
|
boolean |
hasSerial()
Checks whether the 'serial' field has been set, however the value could be null
|
boolean |
hasVersionCode()
Checks whether the 'versionCode' field has been set, however the value could be null
|
boolean |
isNotEmptySecureReports()
Checks whether the 'secureReports' field is set and is not null and is not empty
|
boolean |
isNotNullAssociatedDevice()
Checks whether the 'associatedDevice' field is set and is not null
|
boolean |
isNotNullBuildType()
Checks whether the 'buildType' field is set and is not null
|
boolean |
isNotNullCpuId()
Checks whether the 'cpuId' field is set and is not null
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullCurrentRom()
Checks whether the 'currentRom' field is set and is not null
|
boolean |
isNotNullDeviceType()
Checks whether the 'deviceType' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullModel()
Checks whether the 'model' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullPedCertificate()
Checks whether the 'pedCertificate' field is set and is not null
|
boolean |
isNotNullSecureReports()
Checks whether the 'secureReports' field is set and is not null
|
boolean |
isNotNullSerial()
Checks whether the 'serial' field is set and is not null
|
boolean |
isNotNullVersionCode()
Checks whether the 'versionCode' field is set and is not null
|
void |
mergeChanges(DeviceAccessory 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.
|
DeviceAccessory |
setAssociatedDevice(Reference associatedDevice)
Sets the field 'associatedDevice'.
|
DeviceAccessory |
setBuildType(DeviceAccessoryBuildType buildType)
Sets the field 'buildType'.
|
DeviceAccessory |
setCpuId(String cpuId)
Sets the field 'cpuId'.
|
DeviceAccessory |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
DeviceAccessory |
setCurrentRom(Reference currentRom)
Sets the field 'currentRom'.
|
DeviceAccessory |
setDeviceType(Reference deviceType)
Sets the field 'deviceType'.
|
DeviceAccessory |
setId(String id)
Sets the field 'id'.
|
DeviceAccessory |
setModel(String model)
Sets the field 'model'.
|
DeviceAccessory |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
DeviceAccessory |
setPedCertificate(String pedCertificate)
Sets the field 'pedCertificate'.
|
DeviceAccessory |
setSecureReports(List<Reference> secureReports)
Sets the field 'secureReports'.
|
DeviceAccessory |
setSerial(String serial)
Sets the field 'serial'.
|
DeviceAccessory |
setVersionCode(Long versionCode)
Sets the field 'versionCode'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<DeviceAccessory> CREATOR
public static final JSONifiable.Creator<DeviceAccessory> JSON_CREATOR
public DeviceAccessory()
protected DeviceAccessory(boolean noInit)
public DeviceAccessory(String json) throws IllegalArgumentException
IllegalArgumentException
public DeviceAccessory(JSONObject jsonObject)
public DeviceAccessory(DeviceAccessory src)
public String getId()
public String getModel()
public String getSerial()
public Reference getAssociatedDevice()
public String getCpuId()
public String getPedCertificate()
public DeviceAccessoryBuildType getBuildType()
public Reference getDeviceType()
public Long getVersionCode()
public Reference getCurrentRom()
public Long getCreatedTime()
public Long getModifiedTime()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullModel()
public boolean isNotNullSerial()
public boolean isNotNullAssociatedDevice()
public boolean isNotNullCpuId()
public boolean isNotNullPedCertificate()
public boolean isNotNullBuildType()
public boolean isNotNullDeviceType()
public boolean isNotNullVersionCode()
public boolean isNotNullCurrentRom()
public boolean isNotNullSecureReports()
public boolean isNotEmptySecureReports()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean hasId()
public boolean hasModel()
public boolean hasSerial()
public boolean hasAssociatedDevice()
public boolean hasCpuId()
public boolean hasPedCertificate()
public boolean hasBuildType()
public boolean hasDeviceType()
public boolean hasVersionCode()
public boolean hasCurrentRom()
public boolean hasSecureReports()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public DeviceAccessory setId(String id)
public DeviceAccessory setModel(String model)
public DeviceAccessory setSerial(String serial)
public DeviceAccessory setAssociatedDevice(Reference associatedDevice)
public DeviceAccessory setCpuId(String cpuId)
public DeviceAccessory setPedCertificate(String pedCertificate)
public DeviceAccessory setBuildType(DeviceAccessoryBuildType buildType)
public DeviceAccessory setDeviceType(Reference deviceType)
public DeviceAccessory setVersionCode(Long versionCode)
public DeviceAccessory setCurrentRom(Reference currentRom)
public DeviceAccessory setSecureReports(List<Reference> secureReports)
public DeviceAccessory setCreatedTime(Long createdTime)
public DeviceAccessory setModifiedTime(Long modifiedTime)
public void clearId()
public void clearModel()
public void clearSerial()
public void clearAssociatedDevice()
public void clearCpuId()
public void clearPedCertificate()
public void clearBuildType()
public void clearDeviceType()
public void clearVersionCode()
public void clearCurrentRom()
public void clearSecureReports()
public void clearCreatedTime()
public void clearModifiedTime()
public boolean containsChanges()
public void resetChangeLog()
public DeviceAccessory copyChanges()
public void mergeChanges(DeviceAccessory src)