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.ObjectBuilder forSearchMatchV2.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<HighlightSpan>highlightSpansprotected SearchMatchTypeV2matchTypeprotected MetadataV2metadata
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuilder(MetadataV2 metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchMatchV2build()Builds an instance ofSearchMatchV2configured with this builder's valuesSearchMatchV2.BuilderwithHighlightSpans(java.util.List<HighlightSpan> highlightSpans)Set value for optional field.SearchMatchV2.BuilderwithMatchType(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 anullitem.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
build
public SearchMatchV2 build()
Builds an instance ofSearchMatchV2configured with this builder's values- Returns:
- new instance of
SearchMatchV2
-
-