Package com.clover.sdk.v3.device
Class DeviceAccessory
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.device.DeviceAccessory
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class DeviceAccessory extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
DeviceAccessory.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<DeviceAccessory>
CREATOR
static JSONifiable.Creator<DeviceAccessory>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor 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(String json)
Constructs a new instance from the given JSON String.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearAssociatedDevice()
Clears the 'associatedDevice' field, the 'has' method for this field will now return falsevoid
clearBuildType()
Clears the 'buildType' field, the 'has' method for this field will now return falsevoid
clearCpuId()
Clears the 'cpuId' field, the 'has' method for this field will now return falsevoid
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return falsevoid
clearCurrentRom()
Clears the 'currentRom' field, the 'has' method for this field will now return falsevoid
clearDeviceType()
Clears the 'deviceType' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearModel()
Clears the 'model' field, the 'has' method for this field will now return falsevoid
clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return falsevoid
clearPedCertificate()
Clears the 'pedCertificate' field, the 'has' method for this field will now return falsevoid
clearSecureReports()
Clears the 'secureReports' field, the 'has' method for this field will now return falsevoid
clearSerial()
Clears the 'serial' field, the 'has' method for this field will now return falsevoid
clearVersionCode()
Clears the 'versionCode' field, the 'has' method for this field will now return falseboolean
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 identifierJSONObject
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 nullboolean
hasBuildType()
Checks whether the 'buildType' field has been set, however the value could be nullboolean
hasCpuId()
Checks whether the 'cpuId' field has been set, however the value could be nullboolean
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be nullboolean
hasCurrentRom()
Checks whether the 'currentRom' field has been set, however the value could be nullboolean
hasDeviceType()
Checks whether the 'deviceType' field has been set, however the value could be nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasModel()
Checks whether the 'model' field has been set, however the value could be nullboolean
hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be nullboolean
hasPedCertificate()
Checks whether the 'pedCertificate' field has been set, however the value could be nullboolean
hasSecureReports()
Checks whether the 'secureReports' field has been set, however the value could be nullboolean
hasSerial()
Checks whether the 'serial' field has been set, however the value could be nullboolean
hasVersionCode()
Checks whether the 'versionCode' field has been set, however the value could be nullboolean
isNotEmptySecureReports()
Checks whether the 'secureReports' field is set and is not null and is not emptyboolean
isNotNullAssociatedDevice()
Checks whether the 'associatedDevice' field is set and is not nullboolean
isNotNullBuildType()
Checks whether the 'buildType' field is set and is not nullboolean
isNotNullCpuId()
Checks whether the 'cpuId' field is set and is not nullboolean
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not nullboolean
isNotNullCurrentRom()
Checks whether the 'currentRom' field is set and is not nullboolean
isNotNullDeviceType()
Checks whether the 'deviceType' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullModel()
Checks whether the 'model' field is set and is not nullboolean
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not nullboolean
isNotNullPedCertificate()
Checks whether the 'pedCertificate' field is set and is not nullboolean
isNotNullSecureReports()
Checks whether the 'secureReports' field is set and is not nullboolean
isNotNullSerial()
Checks whether the 'serial' field is set and is not nullboolean
isNotNullVersionCode()
Checks whether the 'versionCode' field is set and is not nullvoid
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()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<DeviceAccessory> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<DeviceAccessory> JSON_CREATOR
-
-
Constructor Detail
-
DeviceAccessory
public DeviceAccessory()
Constructs a new empty instance.
-
DeviceAccessory
protected DeviceAccessory(boolean noInit)
Constructs a new empty instance.
-
DeviceAccessory
public DeviceAccessory(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
DeviceAccessory
public 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
public DeviceAccessory(DeviceAccessory src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getId
public String getId()
Unique identifier
-
getModel
public String getModel()
-
getSerial
public String getSerial()
The accessories' serial number.
-
getAssociatedDevice
public Reference getAssociatedDevice()
The device that this accessory is currently connected to, a 128-bit UUID, not a normal base-13 Clover ID.
-
getCpuId
public String getCpuId()
-
getPedCertificate
public String getPedCertificate()
-
getBuildType
public DeviceAccessoryBuildType getBuildType()
-
getDeviceType
public Reference getDeviceType()
-
getVersionCode
public Long getVersionCode()
-
getCurrentRom
public Reference getCurrentRom()
-
getCreatedTime
public Long getCreatedTime()
-
getModifiedTime
public Long getModifiedTime()
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
getJSONObject
public 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.- Specified by:
getJSONObject
in interfaceJSONifiable
-
isNotNullId
public boolean isNotNullId()
Checks whether the 'id' field is set and is not null
-
isNotNullModel
public boolean isNotNullModel()
Checks whether the 'model' field is set and is not null
-
isNotNullSerial
public boolean isNotNullSerial()
Checks whether the 'serial' field is set and is not null
-
isNotNullAssociatedDevice
public boolean isNotNullAssociatedDevice()
Checks whether the 'associatedDevice' field is set and is not null
-
isNotNullCpuId
public boolean isNotNullCpuId()
Checks whether the 'cpuId' field is set and is not null
-
isNotNullPedCertificate
public boolean isNotNullPedCertificate()
Checks whether the 'pedCertificate' field is set and is not null
-
isNotNullBuildType
public boolean isNotNullBuildType()
Checks whether the 'buildType' field is set and is not null
-
isNotNullDeviceType
public boolean isNotNullDeviceType()
Checks whether the 'deviceType' field is set and is not null
-
isNotNullVersionCode
public boolean isNotNullVersionCode()
Checks whether the 'versionCode' field is set and is not null
-
isNotNullCurrentRom
public boolean isNotNullCurrentRom()
Checks whether the 'currentRom' field is set and is not null
-
isNotNullSecureReports
public boolean isNotNullSecureReports()
Checks whether the 'secureReports' field is set and is not null
-
isNotEmptySecureReports
public boolean isNotEmptySecureReports()
Checks whether the 'secureReports' field is set and is not null and is not empty
-
isNotNullCreatedTime
public boolean isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
-
isNotNullModifiedTime
public boolean isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set, however the value could be null
-
hasModel
public boolean hasModel()
Checks whether the 'model' field has been set, however the value could be null
-
hasSerial
public boolean hasSerial()
Checks whether the 'serial' field has been set, however the value could be null
-
hasAssociatedDevice
public boolean hasAssociatedDevice()
Checks whether the 'associatedDevice' field has been set, however the value could be null
-
hasCpuId
public boolean hasCpuId()
Checks whether the 'cpuId' field has been set, however the value could be null
-
hasPedCertificate
public boolean hasPedCertificate()
Checks whether the 'pedCertificate' field has been set, however the value could be null
-
hasBuildType
public boolean hasBuildType()
Checks whether the 'buildType' field has been set, however the value could be null
-
hasDeviceType
public boolean hasDeviceType()
Checks whether the 'deviceType' field has been set, however the value could be null
-
hasVersionCode
public boolean hasVersionCode()
Checks whether the 'versionCode' field has been set, however the value could be null
-
hasCurrentRom
public boolean hasCurrentRom()
Checks whether the 'currentRom' field has been set, however the value could be null
-
hasSecureReports
public boolean hasSecureReports()
Checks whether the 'secureReports' field has been set, however the value could be null
-
hasCreatedTime
public boolean hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
-
hasModifiedTime
public boolean hasModifiedTime()
Checks whether the 'modifiedTime' field has been set, however the value could be null
-
setId
public DeviceAccessory setId(String id)
Sets the field 'id'.
-
setModel
public DeviceAccessory setModel(String model)
Sets the field 'model'.
-
setSerial
public DeviceAccessory setSerial(String serial)
Sets the field 'serial'.
-
setAssociatedDevice
public DeviceAccessory setAssociatedDevice(Reference associatedDevice)
Sets the field 'associatedDevice'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setCpuId
public DeviceAccessory setCpuId(String cpuId)
Sets the field 'cpuId'.
-
setPedCertificate
public DeviceAccessory setPedCertificate(String pedCertificate)
Sets the field 'pedCertificate'.
-
setBuildType
public DeviceAccessory setBuildType(DeviceAccessoryBuildType buildType)
Sets the field 'buildType'.
-
setDeviceType
public DeviceAccessory setDeviceType(Reference deviceType)
Sets the field 'deviceType'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setVersionCode
public DeviceAccessory setVersionCode(Long versionCode)
Sets the field 'versionCode'.
-
setCurrentRom
public DeviceAccessory setCurrentRom(Reference currentRom)
Sets the field 'currentRom'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setSecureReports
public DeviceAccessory setSecureReports(List<Reference> secureReports)
Sets the field 'secureReports'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setCreatedTime
public DeviceAccessory setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
-
setModifiedTime
public DeviceAccessory setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearModel
public void clearModel()
Clears the 'model' field, the 'has' method for this field will now return false
-
clearSerial
public void clearSerial()
Clears the 'serial' field, the 'has' method for this field will now return false
-
clearAssociatedDevice
public void clearAssociatedDevice()
Clears the 'associatedDevice' field, the 'has' method for this field will now return false
-
clearCpuId
public void clearCpuId()
Clears the 'cpuId' field, the 'has' method for this field will now return false
-
clearPedCertificate
public void clearPedCertificate()
Clears the 'pedCertificate' field, the 'has' method for this field will now return false
-
clearBuildType
public void clearBuildType()
Clears the 'buildType' field, the 'has' method for this field will now return false
-
clearDeviceType
public void clearDeviceType()
Clears the 'deviceType' field, the 'has' method for this field will now return false
-
clearVersionCode
public void clearVersionCode()
Clears the 'versionCode' field, the 'has' method for this field will now return false
-
clearCurrentRom
public void clearCurrentRom()
Clears the 'currentRom' field, the 'has' method for this field will now return false
-
clearSecureReports
public void clearSecureReports()
Clears the 'secureReports' field, the 'has' method for this field will now return false
-
clearCreatedTime
public void clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
-
clearModifiedTime
public void clearModifiedTime()
Clears the 'modifiedTime' field, the 'has' method for this field will now return false
-
containsChanges
public boolean containsChanges()
Returns true if this instance has any changes.
-
resetChangeLog
public void resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
-
copyChanges
public DeviceAccessory copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(DeviceAccessory src)
Copy all the changed fields from the given source to this instance.
-
-