Package com.dropbox.core.v2.sharing
Class VisibilityPolicy
- java.lang.Object
-
- com.dropbox.core.v2.sharing.VisibilityPolicy
-
public class VisibilityPolicy extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowed
protected VisibilityPolicyDisallowedReason
disallowedReason
protected RequestedVisibility
policy
protected AlphaResolvedVisibility
resolvedPolicy
-
Constructor Summary
Constructors Constructor Description VisibilityPolicy(RequestedVisibility policy, AlphaResolvedVisibility resolvedPolicy, boolean allowed)
NoneVisibilityPolicy(RequestedVisibility policy, AlphaResolvedVisibility resolvedPolicy, boolean allowed, VisibilityPolicyDisallowedReason disallowedReason)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
boolean
getAllowed()
Whether the user is permitted to set the visibility to this policy.VisibilityPolicyDisallowedReason
getDisallowedReason()
IfgetAllowed()
isfalse
, this will provide the reason that the user is not permitted to set the visibility to this policy.RequestedVisibility
getPolicy()
This is the value to submit when saving the visibility setting.AlphaResolvedVisibility
getResolvedPolicy()
This is what the effective policy would be, if you selected this option.int
hashCode()
java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
policy
protected final RequestedVisibility policy
-
resolvedPolicy
protected final AlphaResolvedVisibility resolvedPolicy
-
allowed
protected final boolean allowed
-
disallowedReason
protected final VisibilityPolicyDisallowedReason disallowedReason
-
-
Constructor Detail
-
VisibilityPolicy
public VisibilityPolicy(RequestedVisibility policy, AlphaResolvedVisibility resolvedPolicy, boolean allowed, VisibilityPolicyDisallowedReason disallowedReason)
- Parameters:
policy
- This is the value to submit when saving the visibility setting. Must not benull
.resolvedPolicy
- This is what the effective policy would be, if you selected this option. The resolved policy is obtained after considering external effects such as shared folder settings and team policy. This value is guaranteed to be provided. Must not benull
.allowed
- Whether the user is permitted to set the visibility to this policy.disallowedReason
- IfgetAllowed()
isfalse
, this will provide the reason that the user is not permitted to set the visibility to this policy.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
VisibilityPolicy
public VisibilityPolicy(RequestedVisibility policy, AlphaResolvedVisibility resolvedPolicy, boolean allowed)
NoneThe default values for unset fields will be used.
- Parameters:
policy
- This is the value to submit when saving the visibility setting. Must not benull
.resolvedPolicy
- This is what the effective policy would be, if you selected this option. The resolved policy is obtained after considering external effects such as shared folder settings and team policy. This value is guaranteed to be provided. Must not benull
.allowed
- Whether the user is permitted to set the visibility to this policy.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getPolicy
public RequestedVisibility getPolicy()
This is the value to submit when saving the visibility setting.- Returns:
- value for this field, never
null
.
-
getResolvedPolicy
public AlphaResolvedVisibility getResolvedPolicy()
This is what the effective policy would be, if you selected this option. The resolved policy is obtained after considering external effects such as shared folder settings and team policy. This value is guaranteed to be provided.- Returns:
- value for this field, never
null
.
-
getAllowed
public boolean getAllowed()
Whether the user is permitted to set the visibility to this policy.- Returns:
- value for this field.
-
getDisallowedReason
public VisibilityPolicyDisallowedReason getDisallowedReason()
IfgetAllowed()
isfalse
, this will provide the reason that the user is not permitted to set the visibility to this policy.- Returns:
- value for this field, or
null
if not present.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-