Package com.clover.sdk.v3.developer
Class SoftwarePackage
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.developer.SoftwarePackage
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class SoftwarePackage extends GenericParcelable implements Validator, JSONifiable
This is an auto-generated Clover data object.A collection of APK and ROM versions that can be delivered to a merchant as a single package
Fields
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SoftwarePackage.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<SoftwarePackage>
CREATOR
static JSONifiable.Creator<SoftwarePackage>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description SoftwarePackage()
Constructs a new empty instance.protected
SoftwarePackage(boolean noInit)
Constructs a new empty instance.SoftwarePackage(SoftwarePackage src)
Constructs a new instance that is a deep copy of the source instance.SoftwarePackage(String json)
Constructs a new instance from the given JSON String.SoftwarePackage(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
clearAndroidVersions()
Clears the 'androidVersions' field, the 'has' method for this field will now return falsevoid
clearRoms()
Clears the 'roms' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.SoftwarePackage
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.List<Reference>
getAndroidVersions()
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.List<Reference>
getRoms()
boolean
hasAndroidVersions()
Checks whether the 'androidVersions' field has been set, however the value could be nullboolean
hasRoms()
Checks whether the 'roms' field has been set, however the value could be nullboolean
isNotEmptyAndroidVersions()
Checks whether the 'androidVersions' field is set and is not null and is not emptyboolean
isNotEmptyRoms()
Checks whether the 'roms' field is set and is not null and is not emptyboolean
isNotNullAndroidVersions()
Checks whether the 'androidVersions' field is set and is not nullboolean
isNotNullRoms()
Checks whether the 'roms' field is set and is not nullvoid
mergeChanges(SoftwarePackage 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.SoftwarePackage
setAndroidVersions(List<Reference> androidVersions)
Sets the field 'androidVersions'.SoftwarePackage
setRoms(List<Reference> roms)
Sets the field 'roms'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<SoftwarePackage> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<SoftwarePackage> JSON_CREATOR
-
-
Constructor Detail
-
SoftwarePackage
public SoftwarePackage()
Constructs a new empty instance.
-
SoftwarePackage
protected SoftwarePackage(boolean noInit)
Constructs a new empty instance.
-
SoftwarePackage
public SoftwarePackage(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
SoftwarePackage
public SoftwarePackage(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.
-
SoftwarePackage
public SoftwarePackage(SoftwarePackage src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
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
-
isNotNullAndroidVersions
public boolean isNotNullAndroidVersions()
Checks whether the 'androidVersions' field is set and is not null
-
isNotEmptyAndroidVersions
public boolean isNotEmptyAndroidVersions()
Checks whether the 'androidVersions' field is set and is not null and is not empty
-
isNotNullRoms
public boolean isNotNullRoms()
Checks whether the 'roms' field is set and is not null
-
isNotEmptyRoms
public boolean isNotEmptyRoms()
Checks whether the 'roms' field is set and is not null and is not empty
-
hasAndroidVersions
public boolean hasAndroidVersions()
Checks whether the 'androidVersions' field has been set, however the value could be null
-
hasRoms
public boolean hasRoms()
Checks whether the 'roms' field has been set, however the value could be null
-
setAndroidVersions
public SoftwarePackage setAndroidVersions(List<Reference> androidVersions)
Sets the field 'androidVersions'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setRoms
public SoftwarePackage setRoms(List<Reference> roms)
Sets the field 'roms'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
clearAndroidVersions
public void clearAndroidVersions()
Clears the 'androidVersions' field, the 'has' method for this field will now return false
-
clearRoms
public void clearRoms()
Clears the 'roms' 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 SoftwarePackage copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(SoftwarePackage src)
Copy all the changed fields from the given source to this instance.
-
-