Class VisibilityPolicy

java.lang.Object
com.dropbox.core.v2.sharing.VisibilityPolicy

public class VisibilityPolicy extends Object
  • Field Details

  • 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 be null.
      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 be null.
      allowed - Whether the user is permitted to set the visibility to this policy.
      disallowedReason - If getAllowed() is false, 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)
      None

      The default values for unset fields will be used.

      Parameters:
      policy - This is the value to submit when saving the visibility setting. Must not be null.
      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 be null.
      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

      @Nonnull public RequestedVisibility getPolicy()
      This is the value to submit when saving the visibility setting.
      Returns:
      value for this field, never null.
    • getResolvedPolicy

      @Nonnull 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

      @Nullable public VisibilityPolicyDisallowedReason getDisallowedReason()
      If getAllowed() is false, 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 class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringMultiline

      public 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