Package com.clover.sdk.v3.employees
Class PermissionSet
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.employees.PermissionSet
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class PermissionSet 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
PermissionSet.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<PermissionSet>
CREATOR
static JSONifiable.Creator<PermissionSet>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description PermissionSet()
Constructs a new empty instance.protected
PermissionSet(boolean noInit)
Constructs a new empty instance.PermissionSet(PermissionSet src)
Constructs a new instance that is a deep copy of the source instance.PermissionSet(String json)
Constructs a new instance from the given JSON String.PermissionSet(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
clearApp()
Clears the 'app' field, the 'has' method for this field will now return falsevoid
clearEmployeeDefault()
Clears the 'employeeDefault' field, the 'has' method for this field will now return falsevoid
clearEmployeePermissions()
Clears the 'employeePermissions' 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
clearLabel()
Clears the 'label' field, the 'has' method for this field will now return falsevoid
clearManagerDefault()
Clears the 'managerDefault' field, the 'has' method for this field will now return falsevoid
clearModule()
Clears the 'module' 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
clearPermissions()
Clears the 'permissions' field, the 'has' method for this field will now return falsevoid
clearRoles()
Clears the 'roles' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.PermissionSet
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.Reference
getApp()
Boolean
getEmployeeDefault()
List<EmployeePermission>
getEmployeePermissions()
protected 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.String
getLabel()
Label of the permissionSetBoolean
getManagerDefault()
Reference
getModule()
The module associated with this permission set (if any)String
getName()
Key of the permissionSetPermissions
getPermissions()
Bitmap of permissionsList<Reference>
getRoles()
roles enabled for this merchantboolean
hasApp()
Checks whether the 'app' field has been set, however the value could be nullboolean
hasEmployeeDefault()
Checks whether the 'employeeDefault' field has been set, however the value could be nullboolean
hasEmployeePermissions()
Checks whether the 'employeePermissions' 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
hasLabel()
Checks whether the 'label' field has been set, however the value could be nullboolean
hasManagerDefault()
Checks whether the 'managerDefault' field has been set, however the value could be nullboolean
hasModule()
Checks whether the 'module' 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
hasPermissions()
Checks whether the 'permissions' field has been set, however the value could be nullboolean
hasRoles()
Checks whether the 'roles' field has been set, however the value could be nullboolean
isNotEmptyEmployeePermissions()
Checks whether the 'employeePermissions' field is set and is not null and is not emptyboolean
isNotEmptyRoles()
Checks whether the 'roles' field is set and is not null and is not emptyboolean
isNotNullApp()
Checks whether the 'app' field is set and is not nullboolean
isNotNullEmployeeDefault()
Checks whether the 'employeeDefault' field is set and is not nullboolean
isNotNullEmployeePermissions()
Checks whether the 'employeePermissions' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullLabel()
Checks whether the 'label' field is set and is not nullboolean
isNotNullManagerDefault()
Checks whether the 'managerDefault' field is set and is not nullboolean
isNotNullModule()
Checks whether the 'module' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullPermissions()
Checks whether the 'permissions' field is set and is not nullboolean
isNotNullRoles()
Checks whether the 'roles' field is set and is not nullvoid
mergeChanges(PermissionSet 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.PermissionSet
setApp(Reference app)
Sets the field 'app'.PermissionSet
setEmployeeDefault(Boolean employeeDefault)
Sets the field 'employeeDefault'.PermissionSet
setEmployeePermissions(List<EmployeePermission> employeePermissions)
Sets the field 'employeePermissions'.PermissionSet
setId(String id)
Sets the field 'id'.PermissionSet
setLabel(String label)
Sets the field 'label'.PermissionSet
setManagerDefault(Boolean managerDefault)
Sets the field 'managerDefault'.PermissionSet
setModule(Reference module)
Sets the field 'module'.PermissionSet
setName(String name)
Sets the field 'name'.PermissionSet
setPermissions(Permissions permissions)
Sets the field 'permissions'.PermissionSet
setRoles(List<Reference> roles)
Sets the field 'roles'.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<PermissionSet> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<PermissionSet> JSON_CREATOR
-
-
Constructor Detail
-
PermissionSet
public PermissionSet()
Constructs a new empty instance.
-
PermissionSet
protected PermissionSet(boolean noInit)
Constructs a new empty instance.
-
PermissionSet
public PermissionSet(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
PermissionSet
public PermissionSet(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.
-
PermissionSet
public PermissionSet(PermissionSet 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()
Key of the permissionSet
-
getLabel
public String getLabel()
Label of the permissionSet
-
getApp
public Reference getApp()
-
getEmployeeDefault
public Boolean getEmployeeDefault()
-
getManagerDefault
public Boolean getManagerDefault()
-
getPermissions
public Permissions getPermissions()
Bitmap of permissions
-
getEmployeePermissions
public List<EmployeePermission> getEmployeePermissions()
-
getModule
public Reference getModule()
The module associated with this permission set (if any)
-
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
-
isNotNullLabel
public boolean isNotNullLabel()
Checks whether the 'label' field is set and is not null
-
isNotNullApp
public boolean isNotNullApp()
Checks whether the 'app' field is set and is not null
-
isNotNullEmployeeDefault
public boolean isNotNullEmployeeDefault()
Checks whether the 'employeeDefault' field is set and is not null
-
isNotNullManagerDefault
public boolean isNotNullManagerDefault()
Checks whether the 'managerDefault' field is set and is not null
-
isNotNullPermissions
public boolean isNotNullPermissions()
Checks whether the 'permissions' field is set and is not null
-
isNotNullEmployeePermissions
public boolean isNotNullEmployeePermissions()
Checks whether the 'employeePermissions' field is set and is not null
-
isNotEmptyEmployeePermissions
public boolean isNotEmptyEmployeePermissions()
Checks whether the 'employeePermissions' field is set and is not null and is not empty
-
isNotNullRoles
public boolean isNotNullRoles()
Checks whether the 'roles' field is set and is not null
-
isNotEmptyRoles
public boolean isNotEmptyRoles()
Checks whether the 'roles' field is set and is not null and is not empty
-
isNotNullModule
public boolean isNotNullModule()
Checks whether the 'module' 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
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasLabel
public boolean hasLabel()
Checks whether the 'label' field has been set, however the value could be null
-
hasApp
public boolean hasApp()
Checks whether the 'app' field has been set, however the value could be null
-
hasEmployeeDefault
public boolean hasEmployeeDefault()
Checks whether the 'employeeDefault' field has been set, however the value could be null
-
hasManagerDefault
public boolean hasManagerDefault()
Checks whether the 'managerDefault' field has been set, however the value could be null
-
hasPermissions
public boolean hasPermissions()
Checks whether the 'permissions' field has been set, however the value could be null
-
hasEmployeePermissions
public boolean hasEmployeePermissions()
Checks whether the 'employeePermissions' field has been set, however the value could be null
-
hasRoles
public boolean hasRoles()
Checks whether the 'roles' field has been set, however the value could be null
-
hasModule
public boolean hasModule()
Checks whether the 'module' field has been set, however the value could be null
-
setId
public PermissionSet setId(String id)
Sets the field 'id'.
-
setName
public PermissionSet setName(String name)
Sets the field 'name'.
-
setLabel
public PermissionSet setLabel(String label)
Sets the field 'label'.
-
setApp
public PermissionSet setApp(Reference app)
Sets the field 'app'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setEmployeeDefault
public PermissionSet setEmployeeDefault(Boolean employeeDefault)
Sets the field 'employeeDefault'.
-
setManagerDefault
public PermissionSet setManagerDefault(Boolean managerDefault)
Sets the field 'managerDefault'.
-
setPermissions
public PermissionSet setPermissions(Permissions permissions)
Sets the field 'permissions'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setEmployeePermissions
public PermissionSet setEmployeePermissions(List<EmployeePermission> employeePermissions)
Sets the field 'employeePermissions'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setRoles
public PermissionSet setRoles(List<Reference> roles)
Sets the field 'roles'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setModule
public PermissionSet setModule(Reference module)
Sets the field 'module'. 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
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearLabel
public void clearLabel()
Clears the 'label' field, the 'has' method for this field will now return false
-
clearApp
public void clearApp()
Clears the 'app' field, the 'has' method for this field will now return false
-
clearEmployeeDefault
public void clearEmployeeDefault()
Clears the 'employeeDefault' field, the 'has' method for this field will now return false
-
clearManagerDefault
public void clearManagerDefault()
Clears the 'managerDefault' field, the 'has' method for this field will now return false
-
clearPermissions
public void clearPermissions()
Clears the 'permissions' field, the 'has' method for this field will now return false
-
clearEmployeePermissions
public void clearEmployeePermissions()
Clears the 'employeePermissions' field, the 'has' method for this field will now return false
-
clearRoles
public void clearRoles()
Clears the 'roles' field, the 'has' method for this field will now return false
-
clearModule
public void clearModule()
Clears the 'module' 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 PermissionSet copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(PermissionSet src)
Copy all the changed fields from the given source to this instance.
-
-