Package com.dropbox.core.v2.team
Class LegalHoldPolicy.Builder
- java.lang.Object
-
- com.dropbox.core.v2.team.LegalHoldPolicy.Builder
-
- Enclosing class:
- LegalHoldPolicy
public static class LegalHoldPolicy.Builder extends java.lang.Object
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 Modifier Constructor Description protected
Builder(java.lang.String id, java.lang.String name, MembersInfo members, LegalHoldStatus status, java.util.Date startDate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LegalHoldPolicy
build()
Builds an instance ofLegalHoldPolicy
configured with this builder's valuesLegalHoldPolicy.Builder
withActivationTime(java.util.Date activationTime)
Set value for optional field.LegalHoldPolicy.Builder
withDescription(java.lang.String description)
Set value for optional field.LegalHoldPolicy.Builder
withEndDate(java.util.Date endDate)
Set value for optional field.
-
-
-
Field Detail
-
id
protected final java.lang.String id
-
name
protected final java.lang.String name
-
members
protected final MembersInfo members
-
status
protected final LegalHoldStatus status
-
startDate
protected final java.util.Date startDate
-
description
protected java.lang.String description
-
activationTime
protected java.util.Date activationTime
-
endDate
protected java.util.Date endDate
-
-
Constructor Detail
-
Builder
protected Builder(java.lang.String id, java.lang.String name, MembersInfo members, LegalHoldStatus status, java.util.Date startDate)
-
-
Method Detail
-
withDescription
public LegalHoldPolicy.Builder withDescription(java.lang.String description)
Set value for optional field.- Parameters:
description
- A description of the legal hold policy. Must have length of at most 501.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withActivationTime
public LegalHoldPolicy.Builder withActivationTime(java.util.Date activationTime)
Set value for optional field.- Parameters:
activationTime
- The time at which the legal hold was activated.- Returns:
- this builder
-
withEndDate
public LegalHoldPolicy.Builder withEndDate(java.util.Date endDate)
Set value for optional field.- Parameters:
endDate
- End date of the legal hold policy.- Returns:
- this builder
-
build
public LegalHoldPolicy build()
Builds an instance ofLegalHoldPolicy
configured with this builder's values- Returns:
- new instance of
LegalHoldPolicy
-
-