Package com.clover.sdk.v3.apps
Class AppBundle
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.apps.AppBundle
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class AppBundle 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
AppBundle.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<AppBundle>
CREATOR
static JSONifiable.Creator<AppBundle>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description AppBundle()
Constructs a new empty instance.protected
AppBundle(boolean noInit)
Constructs a new empty instance.AppBundle(AppBundle src)
Constructs a new instance that is a deep copy of the source instance.AppBundle(String json)
Constructs a new instance from the given JSON String.AppBundle(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 Deprecated Methods Modifier and Type Method Description void
clearBundleCountries()
Clears the 'bundleCountries' 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
clearIncludedApps()
Clears the 'includedApps' field, the 'has' method for this field will now return falsevoid
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearPrice()
Clears the 'price' field, the 'has' method for this field will now return falsevoid
clearPricePerDevice()
Clears the 'pricePerDevice' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.AppBundle
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.List<AppBundleCountry>
getBundleCountries()
Bundle country options for this app bundleprotected GenericClient
getGenericClient()
String
getId()
Unique identifierList<Reference>
getIncludedApps()
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
getName()
The name of the bundleLong
getPrice()
Deprecated.Long
getPricePerDevice()
Deprecated.boolean
hasBundleCountries()
Checks whether the 'bundleCountries' 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
hasIncludedApps()
Checks whether the 'includedApps' field has been set, however the value could be nullboolean
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasPrice()
Checks whether the 'price' field has been set, however the value could be nullboolean
hasPricePerDevice()
Checks whether the 'pricePerDevice' field has been set, however the value could be nullboolean
isNotEmptyBundleCountries()
Checks whether the 'bundleCountries' field is set and is not null and is not emptyboolean
isNotEmptyIncludedApps()
Checks whether the 'includedApps' field is set and is not null and is not emptyboolean
isNotNullBundleCountries()
Checks whether the 'bundleCountries' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullIncludedApps()
Checks whether the 'includedApps' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullPrice()
Checks whether the 'price' field is set and is not nullboolean
isNotNullPricePerDevice()
Checks whether the 'pricePerDevice' field is set and is not nullvoid
mergeChanges(AppBundle 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.AppBundle
setBundleCountries(List<AppBundleCountry> bundleCountries)
Sets the field 'bundleCountries'.AppBundle
setId(String id)
Sets the field 'id'.AppBundle
setIncludedApps(List<Reference> includedApps)
Sets the field 'includedApps'.AppBundle
setName(String name)
Sets the field 'name'.AppBundle
setPrice(Long price)
Sets the field 'price'.AppBundle
setPricePerDevice(Long pricePerDevice)
Sets the field 'pricePerDevice'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<AppBundle> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<AppBundle> JSON_CREATOR
-
-
Constructor Detail
-
AppBundle
public AppBundle()
Constructs a new empty instance.
-
AppBundle
protected AppBundle(boolean noInit)
Constructs a new empty instance.
-
AppBundle
public AppBundle(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
AppBundle
public AppBundle(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.
-
AppBundle
public AppBundle(AppBundle 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
-
getName
public String getName()
The name of the bundle
-
getPrice
@Deprecated public Long getPrice()
Deprecated.DEPRECATED: Instead use per country pricing in bundleCountries
-
getPricePerDevice
@Deprecated public Long getPricePerDevice()
Deprecated.DEPRECATED: Instead use per country pricing in bundleCountries
-
getBundleCountries
public List<AppBundleCountry> getBundleCountries()
Bundle country options for this app bundle
-
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
-
isNotNullName
public boolean isNotNullName()
Checks whether the 'name' field is set and is not null
-
isNotNullPrice
public boolean isNotNullPrice()
Checks whether the 'price' field is set and is not null
-
isNotNullPricePerDevice
public boolean isNotNullPricePerDevice()
Checks whether the 'pricePerDevice' field is set and is not null
-
isNotNullIncludedApps
public boolean isNotNullIncludedApps()
Checks whether the 'includedApps' field is set and is not null
-
isNotEmptyIncludedApps
public boolean isNotEmptyIncludedApps()
Checks whether the 'includedApps' field is set and is not null and is not empty
-
isNotNullBundleCountries
public boolean isNotNullBundleCountries()
Checks whether the 'bundleCountries' field is set and is not null
-
isNotEmptyBundleCountries
public boolean isNotEmptyBundleCountries()
Checks whether the 'bundleCountries' field is set and is not null and is not empty
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set, however the value could be null
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasPrice
public boolean hasPrice()
Checks whether the 'price' field has been set, however the value could be null
-
hasPricePerDevice
public boolean hasPricePerDevice()
Checks whether the 'pricePerDevice' field has been set, however the value could be null
-
hasIncludedApps
public boolean hasIncludedApps()
Checks whether the 'includedApps' field has been set, however the value could be null
-
hasBundleCountries
public boolean hasBundleCountries()
Checks whether the 'bundleCountries' field has been set, however the value could be null
-
setPricePerDevice
public AppBundle setPricePerDevice(Long pricePerDevice)
Sets the field 'pricePerDevice'.
-
setIncludedApps
public AppBundle setIncludedApps(List<Reference> includedApps)
Sets the field 'includedApps'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setBundleCountries
public AppBundle setBundleCountries(List<AppBundleCountry> bundleCountries)
Sets the field 'bundleCountries'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearPrice
public void clearPrice()
Clears the 'price' field, the 'has' method for this field will now return false
-
clearPricePerDevice
public void clearPricePerDevice()
Clears the 'pricePerDevice' field, the 'has' method for this field will now return false
-
clearIncludedApps
public void clearIncludedApps()
Clears the 'includedApps' field, the 'has' method for this field will now return false
-
clearBundleCountries
public void clearBundleCountries()
Clears the 'bundleCountries' 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 AppBundle copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(AppBundle src)
Copy all the changed fields from the given source to this instance.
-
-