Package com.clover.sdk.v3.apps
Class AppMeteredCountry
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.apps.AppMeteredCountry
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class AppMeteredCountry extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AppMeteredCountry.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<AppMeteredCountry>
CREATOR
static JSONifiable.Creator<AppMeteredCountry>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description AppMeteredCountry()
Constructs a new empty instance.protected
AppMeteredCountry(boolean noInit)
Constructs a new empty instance.AppMeteredCountry(AppMeteredCountry src)
Constructs a new instance that is a deep copy of the source instance.AppMeteredCountry(String json)
Constructs a new instance from the given JSON String.AppMeteredCountry(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
clearAction()
Clears the 'action' field, the 'has' method for this field will now return falsevoid
clearActive()
Clears the 'active' field, the 'has' method for this field will now return falsevoid
clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return falsevoid
clearAppMetered()
Clears the 'appMetered' field, the 'has' method for this field will now return falsevoid
clearCountry()
Clears the 'country' 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 falseboolean
containsChanges()
Returns true if this instance has any changes.AppMeteredCountry
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.String
getAction()
App metered actionBoolean
getActive()
App metered country active statusLong
getAmount()
The cost of the metered countryReference
getAppMetered()
Reference to metered this metered country belongs toString
getCountry()
The country of the metered countryprotected 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.boolean
hasAction()
Checks whether the 'action' field has been set, however the value could be nullboolean
hasActive()
Checks whether the 'active' field has been set, however the value could be nullboolean
hasAmount()
Checks whether the 'amount' field has been set, however the value could be nullboolean
hasAppMetered()
Checks whether the 'appMetered' field has been set, however the value could be nullboolean
hasCountry()
Checks whether the 'country' 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
isNotNullAction()
Checks whether the 'action' field is set and is not nullboolean
isNotNullActive()
Checks whether the 'active' field is set and is not nullboolean
isNotNullAmount()
Checks whether the 'amount' field is set and is not nullboolean
isNotNullAppMetered()
Checks whether the 'appMetered' field is set and is not nullboolean
isNotNullCountry()
Checks whether the 'country' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullvoid
mergeChanges(AppMeteredCountry 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.AppMeteredCountry
setAction(String action)
Sets the field 'action'.AppMeteredCountry
setActive(Boolean active)
Sets the field 'active'.AppMeteredCountry
setAmount(Long amount)
Sets the field 'amount'.AppMeteredCountry
setAppMetered(Reference appMetered)
Sets the field 'appMetered'.AppMeteredCountry
setCountry(String country)
Sets the field 'country'.AppMeteredCountry
setId(String id)
Sets the field 'id'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<AppMeteredCountry> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<AppMeteredCountry> JSON_CREATOR
-
-
Constructor Detail
-
AppMeteredCountry
public AppMeteredCountry()
Constructs a new empty instance.
-
AppMeteredCountry
protected AppMeteredCountry(boolean noInit)
Constructs a new empty instance.
-
AppMeteredCountry
public AppMeteredCountry(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
AppMeteredCountry
public AppMeteredCountry(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.
-
AppMeteredCountry
public AppMeteredCountry(AppMeteredCountry 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
-
getAction
public String getAction()
App metered action
-
getAmount
public Long getAmount()
The cost of the metered country
-
getCountry
public String getCountry()
The country of the metered country
-
getActive
public Boolean getActive()
App metered country active status
-
getAppMetered
public Reference getAppMetered()
Reference to metered this metered country belongs to
-
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
-
isNotNullAction
public boolean isNotNullAction()
Checks whether the 'action' field is set and is not null
-
isNotNullAmount
public boolean isNotNullAmount()
Checks whether the 'amount' field is set and is not null
-
isNotNullCountry
public boolean isNotNullCountry()
Checks whether the 'country' field is set and is not null
-
isNotNullActive
public boolean isNotNullActive()
Checks whether the 'active' field is set and is not null
-
isNotNullAppMetered
public boolean isNotNullAppMetered()
Checks whether the 'appMetered' 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
-
hasAction
public boolean hasAction()
Checks whether the 'action' field has been set, however the value could be null
-
hasAmount
public boolean hasAmount()
Checks whether the 'amount' field has been set, however the value could be null
-
hasCountry
public boolean hasCountry()
Checks whether the 'country' field has been set, however the value could be null
-
hasActive
public boolean hasActive()
Checks whether the 'active' field has been set, however the value could be null
-
hasAppMetered
public boolean hasAppMetered()
Checks whether the 'appMetered' field has been set, however the value could be null
-
setId
public AppMeteredCountry setId(String id)
Sets the field 'id'.
-
setAction
public AppMeteredCountry setAction(String action)
Sets the field 'action'.
-
setAmount
public AppMeteredCountry setAmount(Long amount)
Sets the field 'amount'.
-
setCountry
public AppMeteredCountry setCountry(String country)
Sets the field 'country'.
-
setActive
public AppMeteredCountry setActive(Boolean active)
Sets the field 'active'.
-
setAppMetered
public AppMeteredCountry setAppMetered(Reference appMetered)
Sets the field 'appMetered'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearAction
public void clearAction()
Clears the 'action' field, the 'has' method for this field will now return false
-
clearAmount
public void clearAmount()
Clears the 'amount' field, the 'has' method for this field will now return false
-
clearCountry
public void clearCountry()
Clears the 'country' field, the 'has' method for this field will now return false
-
clearActive
public void clearActive()
Clears the 'active' field, the 'has' method for this field will now return false
-
clearAppMetered
public void clearAppMetered()
Clears the 'appMetered' 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 AppMeteredCountry copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(AppMeteredCountry src)
Copy all the changed fields from the given source to this instance.
-
-