Package com.dropbox.core.v2.sharing
Class VisibilityPolicy
java.lang.Object
com.dropbox.core.v2.sharing.VisibilityPolicy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected final VisibilityPolicyDisallowedReasonprotected final RequestedVisibilityprotected final AlphaResolvedVisibility -
Constructor Summary
ConstructorsConstructorDescriptionVisibilityPolicy(RequestedVisibility policy, AlphaResolvedVisibility resolvedPolicy, boolean allowed) NoneVisibilityPolicy(RequestedVisibility policy, AlphaResolvedVisibility resolvedPolicy, boolean allowed, VisibilityPolicyDisallowedReason disallowedReason) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanWhether the user is permitted to set the visibility to this policy.IfgetAllowed()isfalse, this will provide the reason that the user is not permitted to set the visibility to this policy.This is the value to submit when saving the visibility setting.This is what the effective policy would be, if you selected this option.inthashCode()toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
policy
-
resolvedPolicy
-
allowed
protected final boolean allowed -
disallowedReason
-
-
Constructor Details
-
VisibilityPolicy
public VisibilityPolicy(@Nonnull RequestedVisibility policy, @Nonnull AlphaResolvedVisibility resolvedPolicy, boolean allowed, @Nullable 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:
IllegalArgumentException- If any argument does not meet its preconditions.
-
VisibilityPolicy
public VisibilityPolicy(@Nonnull RequestedVisibility policy, @Nonnull 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:
IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Details
-
getPolicy
This is the value to submit when saving the visibility setting.- Returns:
- value for this field, never
null.
-
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
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
nullif not present.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-