Class LegalHoldPolicy


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

      • id

        @Nonnull
        protected final java.lang.String id
      • name

        @Nonnull
        protected final java.lang.String name
      • description

        @Nullable
        protected final java.lang.String description
      • activationTime

        @Nullable
        protected final java.util.Date activationTime
      • members

        @Nonnull
        protected final MembersInfo members
      • startDate

        @Nonnull
        protected final java.util.Date startDate
      • endDate

        @Nullable
        protected final java.util.Date endDate
    • Constructor Detail

      • LegalHoldPolicy

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

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

      • getId

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

        @Nonnull
        public java.lang.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 java.util.Date getStartDate()
        Start date of the legal hold policy.
        Returns:
        value for this field, never null.
      • getDescription

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

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

        @Nullable
        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 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:
        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