Package com.dropbox.core.v2.team
Class LegalHoldPolicy
- java.lang.Object
-
- com.dropbox.core.v2.team.LegalHoldPolicy
-
public class LegalHoldPolicy extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LegalHoldPolicy.Builder
Builder forLegalHoldPolicy
.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Date
activationTime
protected java.lang.String
description
protected java.util.Date
endDate
protected java.lang.String
id
protected MembersInfo
members
protected java.lang.String
name
protected java.util.Date
startDate
protected LegalHoldStatus
status
-
Constructor Summary
Constructors Constructor Description LegalHoldPolicy(java.lang.String id, java.lang.String name, MembersInfo members, LegalHoldStatus status, java.util.Date startDate)
NoneLegalHoldPolicy(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)
UsenewBuilder(java.lang.String,java.lang.String,com.dropbox.core.v2.team.MembersInfo,com.dropbox.core.v2.team.LegalHoldStatus,java.util.Date)
to create instances of this class without specifying values for all optional fields.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Date
getActivationTime()
The time at which the legal hold was activated.java.lang.String
getDescription()
A description of the legal hold policy.java.util.Date
getEndDate()
End date of the legal hold policy.java.lang.String
getId()
The legal hold id.MembersInfo
getMembers()
Team members IDs and number of permanently deleted members under hold.java.lang.String
getName()
Policy name.java.util.Date
getStartDate()
Start date of the legal hold policy.LegalHoldStatus
getStatus()
The current state of the hold.int
hashCode()
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.java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
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
-
status
@Nonnull protected final LegalHoldStatus status
-
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)
UsenewBuilder(java.lang.String,java.lang.String,com.dropbox.core.v2.team.MembersInfo,com.dropbox.core.v2.team.LegalHoldStatus,java.util.Date)
to create instances of this class without specifying values for all optional fields.- Parameters:
id
- The legal hold id. Must match pattern "^pid_dbhid:.+
" and not benull
.name
- Policy name. Must have length of at most 140 and not benull
.members
- Team members IDs and number of permanently deleted members under hold. Must not benull
.status
- The current state of the hold. Must not benull
.startDate
- Start date of the legal hold policy. Must not benull
.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)
NoneThe default values for unset fields will be used.
- Parameters:
id
- The legal hold id. Must match pattern "^pid_dbhid:.+
" and not benull
.name
- Policy name. Must have length of at most 140 and not benull
.members
- Team members IDs and number of permanently deleted members under hold. Must not benull
.status
- The current state of the hold. Must not benull
.startDate
- Start date of the legal hold policy. Must not benull
.- 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 benull
.name
- Policy name. Must have length of at most 140 and not benull
.members
- Team members IDs and number of permanently deleted members under hold. Must not benull
.status
- The current state of the hold. Must not benull
.startDate
- Start date of the legal hold policy. Must not benull
.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.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
-
-