public class AppMetered extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
AppMetered.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AppMetered> |
CREATOR |
static JSONifiable.Creator<AppMetered> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
AppMetered()
Constructs a new empty instance.
|
|
AppMetered(AppMetered src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
AppMetered(boolean noInit)
Constructs a new empty instance.
|
|
AppMetered(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.
|
|
AppMetered(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearAction()
Clears the 'action' field, the 'has' method for this field will now return false
|
void |
clearActive()
Clears the 'active' field, the 'has' method for this field will now return false
|
void |
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
|
void |
clearApp()
Clears the 'app' 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 |
clearLabel()
Clears the 'label' field, the 'has' method for this field will now return false
|
void |
clearMeteredCountries()
Clears the 'meteredCountries' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
AppMetered |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getAction()
Deprecated.
|
Boolean |
getActive()
Deprecated.
|
Long |
getAmount()
Deprecated.
|
Reference |
getApp()
Reference to the app this metered belongs to
|
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 |
getLabel()
A label used to identify this metered action
|
List<AppMeteredCountry> |
getMeteredCountries()
Metered country options for this app metered
|
boolean |
hasAction()
Checks whether the 'action' field has been set, however the value could be null
|
boolean |
hasActive()
Checks whether the 'active' field has been set, however the value could be null
|
boolean |
hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
|
boolean |
hasApp()
Checks whether the 'app' 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 |
hasLabel()
Checks whether the 'label' field has been set, however the value could be null
|
boolean |
hasMeteredCountries()
Checks whether the 'meteredCountries' field has been set, however the value could be null
|
boolean |
isNotEmptyMeteredCountries()
Checks whether the 'meteredCountries' field is set and is not null and is not empty
|
boolean |
isNotNullAction()
Checks whether the 'action' field is set and is not null
|
boolean |
isNotNullActive()
Checks whether the 'active' field is set and is not null
|
boolean |
isNotNullAmount()
Checks whether the 'amount' field is set and is not null
|
boolean |
isNotNullApp()
Checks whether the 'app' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullLabel()
Checks whether the 'label' field is set and is not null
|
boolean |
isNotNullMeteredCountries()
Checks whether the 'meteredCountries' field is set and is not null
|
void |
mergeChanges(AppMetered 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.
|
AppMetered |
setAction(String action)
Sets the field 'action'.
|
AppMetered |
setActive(Boolean active)
Sets the field 'active'.
|
AppMetered |
setAmount(Long amount)
Sets the field 'amount'.
|
AppMetered |
setApp(Reference app)
Sets the field 'app'.
|
AppMetered |
setId(String id)
Sets the field 'id'.
|
AppMetered |
setLabel(String label)
Sets the field 'label'.
|
AppMetered |
setMeteredCountries(List<AppMeteredCountry> meteredCountries)
Sets the field 'meteredCountries'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<AppMetered> CREATOR
public static final JSONifiable.Creator<AppMetered> JSON_CREATOR
public AppMetered()
protected AppMetered(boolean noInit)
public AppMetered(String json) throws IllegalArgumentException
IllegalArgumentException
public AppMetered(JSONObject jsonObject)
public AppMetered(AppMetered src)
public String getId()
@Deprecated public Long getAmount()
@Deprecated public String getAction()
@Deprecated public Boolean getActive()
public List<AppMeteredCountry> getMeteredCountries()
public Reference getApp()
public String getLabel()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullAmount()
public boolean isNotNullAction()
public boolean isNotNullActive()
public boolean isNotNullMeteredCountries()
public boolean isNotEmptyMeteredCountries()
public boolean isNotNullApp()
public boolean isNotNullLabel()
public boolean hasId()
public boolean hasAmount()
public boolean hasAction()
public boolean hasActive()
public boolean hasMeteredCountries()
public boolean hasApp()
public boolean hasLabel()
public AppMetered setId(String id)
public AppMetered setAmount(Long amount)
public AppMetered setAction(String action)
public AppMetered setActive(Boolean active)
public AppMetered setMeteredCountries(List<AppMeteredCountry> meteredCountries)
public AppMetered setApp(Reference app)
public AppMetered setLabel(String label)
public void clearId()
public void clearAmount()
public void clearAction()
public void clearActive()
public void clearMeteredCountries()
public void clearApp()
public void clearLabel()
public boolean containsChanges()
public void resetChangeLog()
public AppMetered copyChanges()
public void mergeChanges(AppMetered src)