001 002package com.commercetools.ml.client; 003 004import java.net.URI; 005import java.time.Duration; 006import java.util.ArrayList; 007import java.util.Collection; 008import java.util.List; 009import java.util.concurrent.CompletableFuture; 010import java.util.function.Function; 011import java.util.function.Supplier; 012import java.util.stream.Collectors; 013 014import io.vrap.rmf.base.client.*; 015import io.vrap.rmf.base.client.utils.Generated; 016 017import org.apache.commons.lang3.builder.EqualsBuilder; 018import org.apache.commons.lang3.builder.HashCodeBuilder; 019 020/** 021 * <p>This endpoint takes arbitrary product names or image URLs and generates recommendations from a general set of categories, which cover a broad range of industries. The full list of supported categories can be found here. These are independent of the categories that are actually defined in your project. The main purpose of this API is to provide a quick way to test the behavior of the category recommendations engine for different names and images. In contrast to the project-specific endpoint, this endpoint does not have activation criteria and is enabled for all projects.</p> 022 * 023 * <hr> 024 * <div class=code-example> 025 * <pre><code class='java'>{@code 026 * CompletableFuture<ApiHttpResponse<com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse>> result = apiRoot 027 * .withProjectKey("{projectKey}") 028 * .recommendations() 029 * .generalCategories() 030 * .get() 031 * .withProductName(productName) 032 * .execute() 033 * }</code></pre> 034 * </div> 035 */ 036@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 037public class ByProjectKeyRecommendationsGeneralCategoriesGet extends 038 ApiMethod<ByProjectKeyRecommendationsGeneralCategoriesGet, com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse> { 039 040 private String projectKey; 041 042 public ByProjectKeyRecommendationsGeneralCategoriesGet(final ApiHttpClient apiHttpClient, String projectKey) { 043 super(apiHttpClient); 044 this.projectKey = projectKey; 045 } 046 047 public ByProjectKeyRecommendationsGeneralCategoriesGet(ByProjectKeyRecommendationsGeneralCategoriesGet t) { 048 super(t); 049 this.projectKey = t.projectKey; 050 } 051 052 @Override 053 protected ApiHttpRequest buildHttpRequest() { 054 List<String> params = new ArrayList<>(getQueryParamUriStrings()); 055 String httpRequestPath = String.format("%s/recommendations/general-categories", this.projectKey); 056 if (!params.isEmpty()) { 057 httpRequestPath += "?" + String.join("&", params); 058 } 059 return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); 060 } 061 062 @Override 063 public ApiHttpResponse<com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse> executeBlocking( 064 final ApiHttpClient client, final Duration timeout) { 065 return executeBlocking(client, timeout, 066 com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse.class); 067 } 068 069 @Override 070 public CompletableFuture<ApiHttpResponse<com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse>> execute( 071 final ApiHttpClient client) { 072 return execute(client, 073 com.commercetools.ml.models.general_category_recommendations.GeneralCategoryRecommendationPagedQueryResponse.class); 074 } 075 076 public String getProjectKey() { 077 return this.projectKey; 078 } 079 080 public List<String> getProductImageUrl() { 081 return this.getQueryParam("productImageUrl"); 082 } 083 084 public List<String> getProductName() { 085 return this.getQueryParam("productName"); 086 } 087 088 public List<String> getLimit() { 089 return this.getQueryParam("limit"); 090 } 091 092 public List<String> getOffset() { 093 return this.getQueryParam("offset"); 094 } 095 096 public List<String> getConfidenceMin() { 097 return this.getQueryParam("confidenceMin"); 098 } 099 100 public List<String> getConfidenceMax() { 101 return this.getQueryParam("confidenceMax"); 102 } 103 104 public void setProjectKey(final String projectKey) { 105 this.projectKey = projectKey; 106 } 107 108 /** 109 * set productImageUrl with the specified value 110 * @param productImageUrl value to be set 111 * @param <TValue> value type 112 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 113 */ 114 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl(final TValue productImageUrl) { 115 return copy().withQueryParam("productImageUrl", productImageUrl); 116 } 117 118 /** 119 * add additional productImageUrl query parameter 120 * @param productImageUrl value to be added 121 * @param <TValue> value type 122 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 123 */ 124 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl(final TValue productImageUrl) { 125 return copy().addQueryParam("productImageUrl", productImageUrl); 126 } 127 128 /** 129 * set productImageUrl with the specified value 130 * @param supplier supplier for the value to be set 131 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 132 */ 133 public ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl(final Supplier<String> supplier) { 134 return copy().withQueryParam("productImageUrl", supplier.get()); 135 } 136 137 /** 138 * add additional productImageUrl query parameter 139 * @param supplier supplier for the value to be added 140 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 141 */ 142 public ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl(final Supplier<String> supplier) { 143 return copy().addQueryParam("productImageUrl", supplier.get()); 144 } 145 146 /** 147 * set productImageUrl with the specified value 148 * @param op builder for the value to be set 149 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 150 */ 151 public ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl( 152 final Function<StringBuilder, StringBuilder> op) { 153 return copy().withQueryParam("productImageUrl", op.apply(new StringBuilder())); 154 } 155 156 /** 157 * add additional productImageUrl query parameter 158 * @param op builder for the value to be added 159 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 160 */ 161 public ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl( 162 final Function<StringBuilder, StringBuilder> op) { 163 return copy().addQueryParam("productImageUrl", op.apply(new StringBuilder())); 164 } 165 166 /** 167 * set productImageUrl with the specified values 168 * @param productImageUrl values to be set 169 * @param <TValue> value type 170 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 171 */ 172 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withProductImageUrl( 173 final Collection<TValue> productImageUrl) { 174 return copy().withoutQueryParam("productImageUrl") 175 .addQueryParams(productImageUrl.stream() 176 .map(s -> new ParamEntry<>("productImageUrl", s.toString())) 177 .collect(Collectors.toList())); 178 } 179 180 /** 181 * add additional productImageUrl query parameters 182 * @param productImageUrl values to be added 183 * @param <TValue> value type 184 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 185 */ 186 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addProductImageUrl( 187 final Collection<TValue> productImageUrl) { 188 return copy().addQueryParams(productImageUrl.stream() 189 .map(s -> new ParamEntry<>("productImageUrl", s.toString())) 190 .collect(Collectors.toList())); 191 } 192 193 /** 194 * set productName with the specified value 195 * @param productName value to be set 196 * @param <TValue> value type 197 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 198 */ 199 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withProductName(final TValue productName) { 200 return copy().withQueryParam("productName", productName); 201 } 202 203 /** 204 * add additional productName query parameter 205 * @param productName value to be added 206 * @param <TValue> value type 207 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 208 */ 209 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addProductName(final TValue productName) { 210 return copy().addQueryParam("productName", productName); 211 } 212 213 /** 214 * set productName with the specified value 215 * @param supplier supplier for the value to be set 216 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 217 */ 218 public ByProjectKeyRecommendationsGeneralCategoriesGet withProductName(final Supplier<String> supplier) { 219 return copy().withQueryParam("productName", supplier.get()); 220 } 221 222 /** 223 * add additional productName query parameter 224 * @param supplier supplier for the value to be added 225 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 226 */ 227 public ByProjectKeyRecommendationsGeneralCategoriesGet addProductName(final Supplier<String> supplier) { 228 return copy().addQueryParam("productName", supplier.get()); 229 } 230 231 /** 232 * set productName with the specified value 233 * @param op builder for the value to be set 234 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 235 */ 236 public ByProjectKeyRecommendationsGeneralCategoriesGet withProductName( 237 final Function<StringBuilder, StringBuilder> op) { 238 return copy().withQueryParam("productName", op.apply(new StringBuilder())); 239 } 240 241 /** 242 * add additional productName query parameter 243 * @param op builder for the value to be added 244 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 245 */ 246 public ByProjectKeyRecommendationsGeneralCategoriesGet addProductName( 247 final Function<StringBuilder, StringBuilder> op) { 248 return copy().addQueryParam("productName", op.apply(new StringBuilder())); 249 } 250 251 /** 252 * set productName with the specified values 253 * @param productName values to be set 254 * @param <TValue> value type 255 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 256 */ 257 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withProductName( 258 final Collection<TValue> productName) { 259 return copy().withoutQueryParam("productName") 260 .addQueryParams(productName.stream() 261 .map(s -> new ParamEntry<>("productName", s.toString())) 262 .collect(Collectors.toList())); 263 } 264 265 /** 266 * add additional productName query parameters 267 * @param productName values to be added 268 * @param <TValue> value type 269 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 270 */ 271 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addProductName( 272 final Collection<TValue> productName) { 273 return copy().addQueryParams( 274 productName.stream().map(s -> new ParamEntry<>("productName", s.toString())).collect(Collectors.toList())); 275 } 276 277 /** 278 * set limit with the specified value 279 * @param limit value to be set 280 * @param <TValue> value type 281 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 282 */ 283 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final TValue limit) { 284 return copy().withQueryParam("limit", limit); 285 } 286 287 /** 288 * add additional limit query parameter 289 * @param limit value to be added 290 * @param <TValue> value type 291 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 292 */ 293 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final TValue limit) { 294 return copy().addQueryParam("limit", limit); 295 } 296 297 /** 298 * set limit with the specified value 299 * @param supplier supplier for the value to be set 300 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 301 */ 302 public ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final Supplier<Integer> supplier) { 303 return copy().withQueryParam("limit", supplier.get()); 304 } 305 306 /** 307 * add additional limit query parameter 308 * @param supplier supplier for the value to be added 309 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 310 */ 311 public ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final Supplier<Integer> supplier) { 312 return copy().addQueryParam("limit", supplier.get()); 313 } 314 315 /** 316 * set limit with the specified value 317 * @param op builder for the value to be set 318 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 319 */ 320 public ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final Function<StringBuilder, StringBuilder> op) { 321 return copy().withQueryParam("limit", op.apply(new StringBuilder())); 322 } 323 324 /** 325 * add additional limit query parameter 326 * @param op builder for the value to be added 327 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 328 */ 329 public ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final Function<StringBuilder, StringBuilder> op) { 330 return copy().addQueryParam("limit", op.apply(new StringBuilder())); 331 } 332 333 /** 334 * set limit with the specified values 335 * @param limit values to be set 336 * @param <TValue> value type 337 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 338 */ 339 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withLimit(final Collection<TValue> limit) { 340 return copy().withoutQueryParam("limit") 341 .addQueryParams( 342 limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); 343 } 344 345 /** 346 * add additional limit query parameters 347 * @param limit values to be added 348 * @param <TValue> value type 349 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 350 */ 351 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addLimit(final Collection<TValue> limit) { 352 return copy().addQueryParams( 353 limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); 354 } 355 356 /** 357 * set offset with the specified value 358 * @param offset value to be set 359 * @param <TValue> value type 360 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 361 */ 362 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final TValue offset) { 363 return copy().withQueryParam("offset", offset); 364 } 365 366 /** 367 * add additional offset query parameter 368 * @param offset value to be added 369 * @param <TValue> value type 370 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 371 */ 372 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final TValue offset) { 373 return copy().addQueryParam("offset", offset); 374 } 375 376 /** 377 * set offset with the specified value 378 * @param supplier supplier for the value to be set 379 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 380 */ 381 public ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final Supplier<Integer> supplier) { 382 return copy().withQueryParam("offset", supplier.get()); 383 } 384 385 /** 386 * add additional offset query parameter 387 * @param supplier supplier for the value to be added 388 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 389 */ 390 public ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final Supplier<Integer> supplier) { 391 return copy().addQueryParam("offset", supplier.get()); 392 } 393 394 /** 395 * set offset with the specified value 396 * @param op builder for the value to be set 397 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 398 */ 399 public ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final Function<StringBuilder, StringBuilder> op) { 400 return copy().withQueryParam("offset", op.apply(new StringBuilder())); 401 } 402 403 /** 404 * add additional offset query parameter 405 * @param op builder for the value to be added 406 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 407 */ 408 public ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final Function<StringBuilder, StringBuilder> op) { 409 return copy().addQueryParam("offset", op.apply(new StringBuilder())); 410 } 411 412 /** 413 * set offset with the specified values 414 * @param offset values to be set 415 * @param <TValue> value type 416 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 417 */ 418 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withOffset(final Collection<TValue> offset) { 419 return copy().withoutQueryParam("offset") 420 .addQueryParams( 421 offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); 422 } 423 424 /** 425 * add additional offset query parameters 426 * @param offset values to be added 427 * @param <TValue> value type 428 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 429 */ 430 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addOffset(final Collection<TValue> offset) { 431 return copy().addQueryParams( 432 offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); 433 } 434 435 /** 436 * set confidenceMin with the specified value 437 * @param confidenceMin value to be set 438 * @param <TValue> value type 439 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 440 */ 441 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin(final TValue confidenceMin) { 442 return copy().withQueryParam("confidenceMin", confidenceMin); 443 } 444 445 /** 446 * add additional confidenceMin query parameter 447 * @param confidenceMin value to be added 448 * @param <TValue> value type 449 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 450 */ 451 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin(final TValue confidenceMin) { 452 return copy().addQueryParam("confidenceMin", confidenceMin); 453 } 454 455 /** 456 * set confidenceMin with the specified value 457 * @param supplier supplier for the value to be set 458 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 459 */ 460 public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin(final Supplier<Double> supplier) { 461 return copy().withQueryParam("confidenceMin", supplier.get()); 462 } 463 464 /** 465 * add additional confidenceMin query parameter 466 * @param supplier supplier for the value to be added 467 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 468 */ 469 public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin(final Supplier<Double> supplier) { 470 return copy().addQueryParam("confidenceMin", supplier.get()); 471 } 472 473 /** 474 * set confidenceMin with the specified value 475 * @param op builder for the value to be set 476 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 477 */ 478 public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin( 479 final Function<StringBuilder, StringBuilder> op) { 480 return copy().withQueryParam("confidenceMin", op.apply(new StringBuilder())); 481 } 482 483 /** 484 * add additional confidenceMin query parameter 485 * @param op builder for the value to be added 486 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 487 */ 488 public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin( 489 final Function<StringBuilder, StringBuilder> op) { 490 return copy().addQueryParam("confidenceMin", op.apply(new StringBuilder())); 491 } 492 493 /** 494 * set confidenceMin with the specified values 495 * @param confidenceMin values to be set 496 * @param <TValue> value type 497 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 498 */ 499 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMin( 500 final Collection<TValue> confidenceMin) { 501 return copy().withoutQueryParam("confidenceMin") 502 .addQueryParams(confidenceMin.stream() 503 .map(s -> new ParamEntry<>("confidenceMin", s.toString())) 504 .collect(Collectors.toList())); 505 } 506 507 /** 508 * add additional confidenceMin query parameters 509 * @param confidenceMin values to be added 510 * @param <TValue> value type 511 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 512 */ 513 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMin( 514 final Collection<TValue> confidenceMin) { 515 return copy().addQueryParams(confidenceMin.stream() 516 .map(s -> new ParamEntry<>("confidenceMin", s.toString())) 517 .collect(Collectors.toList())); 518 } 519 520 /** 521 * set confidenceMax with the specified value 522 * @param confidenceMax value to be set 523 * @param <TValue> value type 524 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 525 */ 526 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax(final TValue confidenceMax) { 527 return copy().withQueryParam("confidenceMax", confidenceMax); 528 } 529 530 /** 531 * add additional confidenceMax query parameter 532 * @param confidenceMax value to be added 533 * @param <TValue> value type 534 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 535 */ 536 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax(final TValue confidenceMax) { 537 return copy().addQueryParam("confidenceMax", confidenceMax); 538 } 539 540 /** 541 * set confidenceMax with the specified value 542 * @param supplier supplier for the value to be set 543 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 544 */ 545 public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax(final Supplier<Double> supplier) { 546 return copy().withQueryParam("confidenceMax", supplier.get()); 547 } 548 549 /** 550 * add additional confidenceMax query parameter 551 * @param supplier supplier for the value to be added 552 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 553 */ 554 public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax(final Supplier<Double> supplier) { 555 return copy().addQueryParam("confidenceMax", supplier.get()); 556 } 557 558 /** 559 * set confidenceMax with the specified value 560 * @param op builder for the value to be set 561 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 562 */ 563 public ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax( 564 final Function<StringBuilder, StringBuilder> op) { 565 return copy().withQueryParam("confidenceMax", op.apply(new StringBuilder())); 566 } 567 568 /** 569 * add additional confidenceMax query parameter 570 * @param op builder for the value to be added 571 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 572 */ 573 public ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax( 574 final Function<StringBuilder, StringBuilder> op) { 575 return copy().addQueryParam("confidenceMax", op.apply(new StringBuilder())); 576 } 577 578 /** 579 * set confidenceMax with the specified values 580 * @param confidenceMax values to be set 581 * @param <TValue> value type 582 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 583 */ 584 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet withConfidenceMax( 585 final Collection<TValue> confidenceMax) { 586 return copy().withoutQueryParam("confidenceMax") 587 .addQueryParams(confidenceMax.stream() 588 .map(s -> new ParamEntry<>("confidenceMax", s.toString())) 589 .collect(Collectors.toList())); 590 } 591 592 /** 593 * add additional confidenceMax query parameters 594 * @param confidenceMax values to be added 595 * @param <TValue> value type 596 * @return ByProjectKeyRecommendationsGeneralCategoriesGet 597 */ 598 public <TValue> ByProjectKeyRecommendationsGeneralCategoriesGet addConfidenceMax( 599 final Collection<TValue> confidenceMax) { 600 return copy().addQueryParams(confidenceMax.stream() 601 .map(s -> new ParamEntry<>("confidenceMax", s.toString())) 602 .collect(Collectors.toList())); 603 } 604 605 @Override 606 public boolean equals(Object o) { 607 if (this == o) 608 return true; 609 610 if (o == null || getClass() != o.getClass()) 611 return false; 612 613 ByProjectKeyRecommendationsGeneralCategoriesGet that = (ByProjectKeyRecommendationsGeneralCategoriesGet) o; 614 615 return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); 616 } 617 618 @Override 619 public int hashCode() { 620 return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); 621 } 622 623 @Override 624 protected ByProjectKeyRecommendationsGeneralCategoriesGet copy() { 625 return new ByProjectKeyRecommendationsGeneralCategoriesGet(this); 626 } 627}