Class LegalHoldPolicy

java.lang.Object
com.dropbox.core.v2.team.LegalHoldPolicy

public class LegalHoldPolicy extends Object
  • Field Details

    • id

      @Nonnull protected final String id
    • name

      @Nonnull protected final String name
    • description

      @Nullable protected final String description
    • activationTime

      @Nullable protected final Date activationTime
    • members

      @Nonnull protected final MembersInfo members
    • status

      @Nonnull protected final LegalHoldStatus status
    • startDate

      @Nonnull protected final Date startDate
    • endDate

      @Nullable protected final Date endDate
  • Constructor Details

    • LegalHoldPolicy

      public LegalHoldPolicy(@Nonnull String id, @Nonnull String name, @Nonnull MembersInfo members, @Nonnull LegalHoldStatus status, @Nonnull Date startDate, @Nullable String description, @Nullable Date activationTime, @Nullable Date endDate)
      Parameters:
      id - The legal hold id. Must match pattern "^pid_dbhid:.+" and not be null.
      name - Policy name. Must have length of at most 140 and not be null.
      members - Team members IDs and number of permanently deleted members under hold. Must not be null.
      status - The current state of the hold. Must not be null.
      startDate - Start date of the legal hold policy. Must not be null.
      description - A description of the legal hold policy. Must have length of at most 501.
      activationTime - The time at which the legal hold was activated.
      endDate - End date of the legal hold policy.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • LegalHoldPolicy

      public LegalHoldPolicy(@Nonnull String id, @Nonnull String name, @Nonnull MembersInfo members, @Nonnull LegalHoldStatus status, @Nonnull Date startDate)
      None

      The default values for unset fields will be used.

      Parameters:
      id - The legal hold id. Must match pattern "^pid_dbhid:.+" and not be null.
      name - Policy name. Must have length of at most 140 and not be null.
      members - Team members IDs and number of permanently deleted members under hold. Must not be null.
      status - The current state of the hold. Must not be null.
      startDate - Start date of the legal hold policy. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getId

      @Nonnull public String getId()
      The legal hold id.
      Returns:
      value for this field, never null.
    • getName

      @Nonnull public String getName()
      Policy name.
      Returns:
      value for this field, never null.
    • getMembers

      @Nonnull public MembersInfo getMembers()
      Team members IDs and number of permanently deleted members under hold.
      Returns:
      value for this field, never null.
    • getStatus

      @Nonnull public LegalHoldStatus getStatus()
      The current state of the hold.
      Returns:
      value for this field, never null.
    • getStartDate

      @Nonnull public Date getStartDate()
      Start date of the legal hold policy.
      Returns:
      value for this field, never null.
    • getDescription

      @Nullable public String getDescription()
      A description of the legal hold policy.
      Returns:
      value for this field, or null if not present.
    • getActivationTime

      @Nullable public Date getActivationTime()
      The time at which the legal hold was activated.
      Returns:
      value for this field, or null if not present.
    • getEndDate

      @Nullable public Date getEndDate()
      End date of the legal hold policy.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static LegalHoldPolicy.Builder newBuilder(String id, String name, MembersInfo members, LegalHoldStatus status, Date startDate)
      Returns a new builder for creating an instance of this class.
      Parameters:
      id - The legal hold id. Must match pattern "^pid_dbhid:.+" and not be null.
      name - Policy name. Must have length of at most 140 and not be null.
      members - Team members IDs and number of permanently deleted members under hold. Must not be null.
      status - The current state of the hold. Must not be null.
      startDate - Start date of the legal hold policy. Must not be null.
      Returns:
      builder for this class.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • 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