Package com.dropbox.core.v2.files
Class SearchMatchV2.Builder
- java.lang.Object
-
- com.dropbox.core.v2.files.SearchMatchV2.Builder
-
- Enclosing class:
- SearchMatchV2
public static class SearchMatchV2.Builder extends java.lang.Object
Builder forSearchMatchV2
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<HighlightSpan>
highlightSpans
protected SearchMatchTypeV2
matchType
protected MetadataV2
metadata
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(MetadataV2 metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchMatchV2
build()
Builds an instance ofSearchMatchV2
configured with this builder's valuesSearchMatchV2.Builder
withHighlightSpans(java.util.List<HighlightSpan> highlightSpans)
Set value for optional field.SearchMatchV2.Builder
withMatchType(SearchMatchTypeV2 matchType)
Set value for optional field.
-
-
-
Field Detail
-
metadata
protected final MetadataV2 metadata
-
matchType
protected SearchMatchTypeV2 matchType
-
highlightSpans
protected java.util.List<HighlightSpan> highlightSpans
-
-
Constructor Detail
-
Builder
protected Builder(MetadataV2 metadata)
-
-
Method Detail
-
withMatchType
public SearchMatchV2.Builder withMatchType(SearchMatchTypeV2 matchType)
Set value for optional field.- Parameters:
matchType
- The type of the match.- Returns:
- this builder
-
withHighlightSpans
public SearchMatchV2.Builder withHighlightSpans(java.util.List<HighlightSpan> highlightSpans)
Set value for optional field.- Parameters:
highlightSpans
- The list of HighlightSpan determines which parts of the file title should be highlighted. Must not contain anull
item.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
build
public SearchMatchV2 build()
Builds an instance ofSearchMatchV2
configured with this builder's values- Returns:
- new instance of
SearchMatchV2
-
-