Package com.clover.sdk.v3.employees
Class PermissionSetRole
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.employees.PermissionSetRole
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class PermissionSetRole extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PermissionSetRole.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 String
AUTHORITY
static Parcelable.Creator<PermissionSetRole>
CREATOR
static JSONifiable.Creator<PermissionSetRole>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description PermissionSetRole()
Constructs a new empty instance.protected
PermissionSetRole(boolean noInit)
Constructs a new empty instance.PermissionSetRole(PermissionSetRole src)
Constructs a new instance that is a deep copy of the source instance.PermissionSetRole(String json)
Constructs a new instance from the given JSON String.PermissionSetRole(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
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearPermissionSet()
Clears the 'permissionSet' field, the 'has' method for this field will now return falsevoid
clearRole()
Clears the 'role' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.PermissionSetRole
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.protected GenericClient
getGenericClient()
String
getId()
Not a normal Clover IDJSONObject
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.Reference
getPermissionSet()
The roleReference
getRole()
The roleboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasPermissionSet()
Checks whether the 'permissionSet' field has been set, however the value could be nullboolean
hasRole()
Checks whether the 'role' field has been set, however the value could be nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullPermissionSet()
Checks whether the 'permissionSet' field is set and is not nullboolean
isNotNullRole()
Checks whether the 'role' field is set and is not nullvoid
mergeChanges(PermissionSetRole 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.PermissionSetRole
setId(String id)
Sets the field 'id'.PermissionSetRole
setPermissionSet(Reference permissionSet)
Sets the field 'permissionSet'.PermissionSetRole
setRole(Reference role)
Sets the field 'role'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
AUTHORITY
public static final String AUTHORITY
- See Also:
- Constant Field Values
-
CREATOR
public static final Parcelable.Creator<PermissionSetRole> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<PermissionSetRole> JSON_CREATOR
-
-
Constructor Detail
-
PermissionSetRole
public PermissionSetRole()
Constructs a new empty instance.
-
PermissionSetRole
protected PermissionSetRole(boolean noInit)
Constructs a new empty instance.
-
PermissionSetRole
public PermissionSetRole(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
PermissionSetRole
public PermissionSetRole(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.
-
PermissionSetRole
public PermissionSetRole(PermissionSetRole 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()
Not a normal Clover ID
-
getRole
public Reference getRole()
The role
-
getPermissionSet
public Reference getPermissionSet()
The role
-
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
-
isNotNullRole
public boolean isNotNullRole()
Checks whether the 'role' field is set and is not null
-
isNotNullPermissionSet
public boolean isNotNullPermissionSet()
Checks whether the 'permissionSet' 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
-
hasRole
public boolean hasRole()
Checks whether the 'role' field has been set, however the value could be null
-
hasPermissionSet
public boolean hasPermissionSet()
Checks whether the 'permissionSet' field has been set, however the value could be null
-
setId
public PermissionSetRole setId(String id)
Sets the field 'id'.
-
setRole
public PermissionSetRole setRole(Reference role)
Sets the field 'role'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setPermissionSet
public PermissionSetRole setPermissionSet(Reference permissionSet)
Sets the field 'permissionSet'. 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
-
clearRole
public void clearRole()
Clears the 'role' field, the 'has' method for this field will now return false
-
clearPermissionSet
public void clearPermissionSet()
Clears the 'permissionSet' 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 PermissionSetRole copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(PermissionSetRole src)
Copy all the changed fields from the given source to this instance.
-
-