Package com.dropbox.core.v2.sharing
Class MemberPermission
- java.lang.Object
-
- com.dropbox.core.v2.sharing.MemberPermission
-
public class MemberPermission extends java.lang.ObjectWhether the user is allowed to take the action on the associated member.
-
-
Field Summary
Fields Modifier and Type Field Description protected MemberActionactionprotected booleanallowprotected PermissionDeniedReasonreason
-
Constructor Summary
Constructors Constructor Description MemberPermission(MemberAction action, boolean allow)Whether the user is allowed to take the action on the associated member.MemberPermission(MemberAction action, boolean allow, PermissionDeniedReason reason)Whether the user is allowed to take the action on the associated member.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)MemberActiongetAction()The action that the user may wish to take on the member.booleangetAllow()True if the user is allowed to take the action.PermissionDeniedReasongetReason()The reason why the user is denied the permission.inthashCode()java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
action
protected final MemberAction action
-
allow
protected final boolean allow
-
reason
protected final PermissionDeniedReason reason
-
-
Constructor Detail
-
MemberPermission
public MemberPermission(MemberAction action, boolean allow, PermissionDeniedReason reason)
Whether the user is allowed to take the action on the associated member.- Parameters:
action- The action that the user may wish to take on the member. Must not benull.allow- True if the user is allowed to take the action.reason- The reason why the user is denied the permission. Not present if the action is allowed.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
MemberPermission
public MemberPermission(MemberAction action, boolean allow)
Whether the user is allowed to take the action on the associated member.The default values for unset fields will be used.
- Parameters:
action- The action that the user may wish to take on the member. Must not benull.allow- True if the user is allowed to take the action.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Detail
-
getAction
public MemberAction getAction()
The action that the user may wish to take on the member.- Returns:
- value for this field, never
null.
-
getAllow
public boolean getAllow()
True if the user is allowed to take the action.- Returns:
- value for this field.
-
getReason
public PermissionDeniedReason getReason()
The reason why the user is denied the permission. Not present if the action is allowed.- Returns:
- value for this field, or
nullif not present.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toStringMultiline
public java.lang.String toStringMultiline()
Returns a String representation of this object formatted for easier readability.The returned String may contain newlines.
- Returns:
- Formatted, multiline String representation of this object
-
-