Class LegalHoldPolicy


  • public class LegalHoldPolicy
    extends java.lang.Object
    • Field Detail

      • id

        protected final java.lang.String id
      • name

        protected final java.lang.String name
      • description

        protected final java.lang.String description
      • activationTime

        protected final java.util.Date activationTime
      • startDate

        protected final java.util.Date startDate
      • endDate

        protected final java.util.Date endDate
    • Constructor Detail

      • LegalHoldPolicy

        public LegalHoldPolicy​(java.lang.String id,
                               java.lang.String name,
                               MembersInfo members,
                               LegalHoldStatus status,
                               java.util.Date startDate,
                               java.lang.String description,
                               java.util.Date activationTime,
                               java.util.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 permanetly 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:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • LegalHoldPolicy

        public LegalHoldPolicy​(java.lang.String id,
                               java.lang.String name,
                               MembersInfo members,
                               LegalHoldStatus status,
                               java.util.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 permanetly 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:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getId

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

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

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

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

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

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

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

        public java.util.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​(java.lang.String id,
                                                         java.lang.String name,
                                                         MembersInfo members,
                                                         LegalHoldStatus status,
                                                         java.util.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 permanetly 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:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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