@@ -29,6 +29,7 @@ public class SearchConfiguration {
2929 public Boolean liveFeeds ;
3030 public String matchRequirements ;
3131 public String sourceCategoryRequirements ;
32+ public Boolean inferPersons ;
3233 public String extraParams ;
3334
3435 public SearchConfiguration () {
@@ -60,11 +61,18 @@ public SearchConfiguration(String protocol, String host, String path,
6061 String apiKey , float minimumProbability , String showSources ,
6162 boolean hideSponsored , float minimumMatch , boolean liveFeeds ,
6263 String matchRequirements , String sourceCategoryRequirements ) {
63- this (protocol , host , path , apiKey , minimumProbability , showSources , hideSponsored , minimumMatch , liveFeeds );
64- setMatchRequirements (matchRequirements );
64+ this (protocol , host , path , apiKey , minimumProbability , showSources , hideSponsored , minimumMatch , liveFeeds , matchRequirements );
6565 setSourceCategoryRequirements (sourceCategoryRequirements );
6666 }
6767
68+ public SearchConfiguration (String protocol , String host , String path ,
69+ String apiKey , float minimumProbability , String showSources ,
70+ boolean hideSponsored , float minimumMatch , boolean liveFeeds ,
71+ String matchRequirements , String sourceCategoryRequirements , boolean inferPersons ) {
72+ this (protocol , host , path , apiKey , minimumProbability , showSources , hideSponsored , minimumMatch , liveFeeds , matchRequirements , sourceCategoryRequirements );
73+ setInferPersons (inferPersons );
74+ }
75+
6876 public SearchConfiguration (Builder builder ) {
6977 setProtocol (builder .protocol );
7078 setHost (builder .host );
@@ -77,6 +85,7 @@ public SearchConfiguration(Builder builder) {
7785 setLiveFeeds (builder .liveFeeds );
7886 setMatchRequirements (builder .matchRequirements );
7987 setSourceCategoryRequirements (builder .sourceCategoryRequirements );
88+ setInferPersons (builder .inferPersons );
8089 }
8190
8291 /**
@@ -245,6 +254,10 @@ public void setMatchRequirements(String matchRequirements) {
245254 this .matchRequirements = matchRequirements ;
246255 }
247256
257+ public String getSourceCategoryRequirements () {
258+ return this .sourceCategoryRequirements ;
259+ }
260+
248261 /**
249262 * @param sourceCategoryRequirements a source category requirements criteria.
250263 * This criteria defines what source categories must be present in an
@@ -256,6 +269,22 @@ public void setSourceCategoryRequirements(String sourceCategoryRequirements) {
256269 this .sourceCategoryRequirements = sourceCategoryRequirements ;
257270 }
258271
272+ public boolean getInferPersons () {
273+ if (this .inferPersons ) {
274+ return false ;
275+ }
276+ return this .inferPersons ;
277+ }
278+
279+ /**
280+ * @param InferPersons
281+ * If set, the API may return person responses made up
282+ * solely from data inferred by statistical analysis.
283+ */
284+ public void setInferPersons (boolean inferPersons ) {
285+ this .inferPersons = inferPersons ;
286+ }
287+
259288 @ Override
260289 public String toString () {
261290 StringBuilder sb = new StringBuilder ();
@@ -282,6 +311,9 @@ public String toString() {
282311 if (sourceCategoryRequirements !=null ) {
283312 sb .append ("&source_category_requirements=" ).append (sourceCategoryRequirements );
284313 }
314+ if (inferPersons !=null ) {
315+ sb .append ("&infer_persons=" ).append (String .valueOf (inferPersons ));
316+ }
285317 if (extraParams !=null ) {
286318 sb .append (extraParams );
287319 }
@@ -300,6 +332,7 @@ public static class Builder {
300332 private Boolean liveFeeds ;
301333 private String matchRequirements ;
302334 private String sourceCategoryRequirements ;
335+ private Boolean inferPersons ;
303336
304337 public Builder protocol (String protocol ) {
305338 this .protocol = protocol ;
@@ -356,6 +389,11 @@ public Builder sourceCategoryRequirements(String sourceCategoryRequirements) {
356389 return this ;
357390 }
358391
392+ public Builder inferPersons (boolean inferPersons ) {
393+ this .inferPersons = inferPersons ;
394+ return this ;
395+ }
396+
359397 }
360398
361399}
0 commit comments