001 002package com.commercetools.api.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>Use the Product Projections query endpoint to get the current or staged representations of Products. When used with an API Client that has the <code>view_published_products:{projectKey}</code> scope, this endpoint only returns published (current) Product Projections.</p> 022 * 023 * <hr> 024 * <div class=code-example> 025 * <pre><code class='java'>{@code 026 * CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product.ProductProjectionPagedQueryResponse>> result = apiRoot 027 * .withProjectKey("{projectKey}") 028 * .productProjections() 029 * .get() 030 * .execute() 031 * }</code></pre> 032 * </div> 033 */ 034@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") 035public class ByProjectKeyProductProjectionsGet extends 036 ApiMethod<ByProjectKeyProductProjectionsGet, com.commercetools.api.models.product.ProductProjectionPagedQueryResponse> 037 implements ByProjectKeyProductProjectionsGetMixin, 038 com.commercetools.api.client.ProjectionselectingTrait<ByProjectKeyProductProjectionsGet>, 039 com.commercetools.api.client.PriceselectingTrait<ByProjectKeyProductProjectionsGet>, 040 com.commercetools.api.client.LocaleprojectingTrait<ByProjectKeyProductProjectionsGet>, 041 com.commercetools.api.client.StoreprojectingTrait<ByProjectKeyProductProjectionsGet>, 042 com.commercetools.api.client.ExpandableTrait<ByProjectKeyProductProjectionsGet>, 043 com.commercetools.api.client.SortableTrait<ByProjectKeyProductProjectionsGet>, 044 com.commercetools.api.client.PagingTrait<ByProjectKeyProductProjectionsGet>, 045 com.commercetools.api.client.QueryTrait<ByProjectKeyProductProjectionsGet>, 046 com.commercetools.api.client.ErrorableTrait<ByProjectKeyProductProjectionsGet>, 047 com.commercetools.api.client.Deprecatable200Trait<ByProjectKeyProductProjectionsGet> { 048 049 private String projectKey; 050 051 public ByProjectKeyProductProjectionsGet(final ApiHttpClient apiHttpClient, String projectKey) { 052 super(apiHttpClient); 053 this.projectKey = projectKey; 054 } 055 056 public ByProjectKeyProductProjectionsGet(ByProjectKeyProductProjectionsGet t) { 057 super(t); 058 this.projectKey = t.projectKey; 059 } 060 061 @Override 062 protected ApiHttpRequest buildHttpRequest() { 063 List<String> params = new ArrayList<>(getQueryParamUriStrings()); 064 String httpRequestPath = String.format("%s/product-projections", this.projectKey); 065 if (!params.isEmpty()) { 066 httpRequestPath += "?" + String.join("&", params); 067 } 068 return new ApiHttpRequest(ApiHttpMethod.GET, URI.create(httpRequestPath), getHeaders(), null); 069 } 070 071 @Override 072 public ApiHttpResponse<com.commercetools.api.models.product.ProductProjectionPagedQueryResponse> executeBlocking( 073 final ApiHttpClient client, final Duration timeout) { 074 return executeBlocking(client, timeout, 075 com.commercetools.api.models.product.ProductProjectionPagedQueryResponse.class); 076 } 077 078 @Override 079 public CompletableFuture<ApiHttpResponse<com.commercetools.api.models.product.ProductProjectionPagedQueryResponse>> execute( 080 final ApiHttpClient client) { 081 return execute(client, com.commercetools.api.models.product.ProductProjectionPagedQueryResponse.class); 082 } 083 084 public String getProjectKey() { 085 return this.projectKey; 086 } 087 088 public List<String> getStaged() { 089 return this.getQueryParam("staged"); 090 } 091 092 public List<String> getPriceCurrency() { 093 return this.getQueryParam("priceCurrency"); 094 } 095 096 public List<String> getPriceCountry() { 097 return this.getQueryParam("priceCountry"); 098 } 099 100 public List<String> getPriceCustomerGroup() { 101 return this.getQueryParam("priceCustomerGroup"); 102 } 103 104 public List<String> getPriceChannel() { 105 return this.getQueryParam("priceChannel"); 106 } 107 108 public List<String> getLocaleProjection() { 109 return this.getQueryParam("localeProjection"); 110 } 111 112 public List<String> getStoreProjection() { 113 return this.getQueryParam("storeProjection"); 114 } 115 116 public List<String> getExpand() { 117 return this.getQueryParam("expand"); 118 } 119 120 public List<String> getSort() { 121 return this.getQueryParam("sort"); 122 } 123 124 public List<String> getLimit() { 125 return this.getQueryParam("limit"); 126 } 127 128 public List<String> getOffset() { 129 return this.getQueryParam("offset"); 130 } 131 132 public List<String> getWithTotal() { 133 return this.getQueryParam("withTotal"); 134 } 135 136 public List<String> getWhere() { 137 return this.getQueryParam("where"); 138 } 139 140 public void setProjectKey(final String projectKey) { 141 this.projectKey = projectKey; 142 } 143 144 /** 145 * set staged with the specified value 146 * @param staged value to be set 147 * @param <TValue> value type 148 * @return ByProjectKeyProductProjectionsGet 149 */ 150 public <TValue> ByProjectKeyProductProjectionsGet withStaged(final TValue staged) { 151 return copy().withQueryParam("staged", staged); 152 } 153 154 /** 155 * add additional staged query parameter 156 * @param staged value to be added 157 * @param <TValue> value type 158 * @return ByProjectKeyProductProjectionsGet 159 */ 160 public <TValue> ByProjectKeyProductProjectionsGet addStaged(final TValue staged) { 161 return copy().addQueryParam("staged", staged); 162 } 163 164 /** 165 * set staged with the specified value 166 * @param supplier supplier for the value to be set 167 * @return ByProjectKeyProductProjectionsGet 168 */ 169 public ByProjectKeyProductProjectionsGet withStaged(final Supplier<Boolean> supplier) { 170 return copy().withQueryParam("staged", supplier.get()); 171 } 172 173 /** 174 * add additional staged query parameter 175 * @param supplier supplier for the value to be added 176 * @return ByProjectKeyProductProjectionsGet 177 */ 178 public ByProjectKeyProductProjectionsGet addStaged(final Supplier<Boolean> supplier) { 179 return copy().addQueryParam("staged", supplier.get()); 180 } 181 182 /** 183 * set staged with the specified value 184 * @param op builder for the value to be set 185 * @return ByProjectKeyProductProjectionsGet 186 */ 187 public ByProjectKeyProductProjectionsGet withStaged(final Function<StringBuilder, StringBuilder> op) { 188 return copy().withQueryParam("staged", op.apply(new StringBuilder())); 189 } 190 191 /** 192 * add additional staged query parameter 193 * @param op builder for the value to be added 194 * @return ByProjectKeyProductProjectionsGet 195 */ 196 public ByProjectKeyProductProjectionsGet addStaged(final Function<StringBuilder, StringBuilder> op) { 197 return copy().addQueryParam("staged", op.apply(new StringBuilder())); 198 } 199 200 /** 201 * set staged with the specified values 202 * @param staged values to be set 203 * @param <TValue> value type 204 * @return ByProjectKeyProductProjectionsGet 205 */ 206 public <TValue> ByProjectKeyProductProjectionsGet withStaged(final Collection<TValue> staged) { 207 return copy().withoutQueryParam("staged") 208 .addQueryParams( 209 staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); 210 } 211 212 /** 213 * add additional staged query parameters 214 * @param staged values to be added 215 * @param <TValue> value type 216 * @return ByProjectKeyProductProjectionsGet 217 */ 218 public <TValue> ByProjectKeyProductProjectionsGet addStaged(final Collection<TValue> staged) { 219 return copy().addQueryParams( 220 staged.stream().map(s -> new ParamEntry<>("staged", s.toString())).collect(Collectors.toList())); 221 } 222 223 /** 224 * set priceCurrency with the specified value 225 * @param priceCurrency value to be set 226 * @param <TValue> value type 227 * @return ByProjectKeyProductProjectionsGet 228 */ 229 public <TValue> ByProjectKeyProductProjectionsGet withPriceCurrency(final TValue priceCurrency) { 230 return copy().withQueryParam("priceCurrency", priceCurrency); 231 } 232 233 /** 234 * add additional priceCurrency query parameter 235 * @param priceCurrency value to be added 236 * @param <TValue> value type 237 * @return ByProjectKeyProductProjectionsGet 238 */ 239 public <TValue> ByProjectKeyProductProjectionsGet addPriceCurrency(final TValue priceCurrency) { 240 return copy().addQueryParam("priceCurrency", priceCurrency); 241 } 242 243 /** 244 * set priceCurrency with the specified value 245 * @param supplier supplier for the value to be set 246 * @return ByProjectKeyProductProjectionsGet 247 */ 248 public ByProjectKeyProductProjectionsGet withPriceCurrency(final Supplier<String> supplier) { 249 return copy().withQueryParam("priceCurrency", supplier.get()); 250 } 251 252 /** 253 * add additional priceCurrency query parameter 254 * @param supplier supplier for the value to be added 255 * @return ByProjectKeyProductProjectionsGet 256 */ 257 public ByProjectKeyProductProjectionsGet addPriceCurrency(final Supplier<String> supplier) { 258 return copy().addQueryParam("priceCurrency", supplier.get()); 259 } 260 261 /** 262 * set priceCurrency with the specified value 263 * @param op builder for the value to be set 264 * @return ByProjectKeyProductProjectionsGet 265 */ 266 public ByProjectKeyProductProjectionsGet withPriceCurrency(final Function<StringBuilder, StringBuilder> op) { 267 return copy().withQueryParam("priceCurrency", op.apply(new StringBuilder())); 268 } 269 270 /** 271 * add additional priceCurrency query parameter 272 * @param op builder for the value to be added 273 * @return ByProjectKeyProductProjectionsGet 274 */ 275 public ByProjectKeyProductProjectionsGet addPriceCurrency(final Function<StringBuilder, StringBuilder> op) { 276 return copy().addQueryParam("priceCurrency", op.apply(new StringBuilder())); 277 } 278 279 /** 280 * set priceCurrency with the specified values 281 * @param priceCurrency values to be set 282 * @param <TValue> value type 283 * @return ByProjectKeyProductProjectionsGet 284 */ 285 public <TValue> ByProjectKeyProductProjectionsGet withPriceCurrency(final Collection<TValue> priceCurrency) { 286 return copy().withoutQueryParam("priceCurrency") 287 .addQueryParams(priceCurrency.stream() 288 .map(s -> new ParamEntry<>("priceCurrency", s.toString())) 289 .collect(Collectors.toList())); 290 } 291 292 /** 293 * add additional priceCurrency query parameters 294 * @param priceCurrency values to be added 295 * @param <TValue> value type 296 * @return ByProjectKeyProductProjectionsGet 297 */ 298 public <TValue> ByProjectKeyProductProjectionsGet addPriceCurrency(final Collection<TValue> priceCurrency) { 299 return copy().addQueryParams(priceCurrency.stream() 300 .map(s -> new ParamEntry<>("priceCurrency", s.toString())) 301 .collect(Collectors.toList())); 302 } 303 304 /** 305 * set priceCountry with the specified value 306 * @param priceCountry value to be set 307 * @param <TValue> value type 308 * @return ByProjectKeyProductProjectionsGet 309 */ 310 public <TValue> ByProjectKeyProductProjectionsGet withPriceCountry(final TValue priceCountry) { 311 return copy().withQueryParam("priceCountry", priceCountry); 312 } 313 314 /** 315 * add additional priceCountry query parameter 316 * @param priceCountry value to be added 317 * @param <TValue> value type 318 * @return ByProjectKeyProductProjectionsGet 319 */ 320 public <TValue> ByProjectKeyProductProjectionsGet addPriceCountry(final TValue priceCountry) { 321 return copy().addQueryParam("priceCountry", priceCountry); 322 } 323 324 /** 325 * set priceCountry with the specified value 326 * @param supplier supplier for the value to be set 327 * @return ByProjectKeyProductProjectionsGet 328 */ 329 public ByProjectKeyProductProjectionsGet withPriceCountry(final Supplier<String> supplier) { 330 return copy().withQueryParam("priceCountry", supplier.get()); 331 } 332 333 /** 334 * add additional priceCountry query parameter 335 * @param supplier supplier for the value to be added 336 * @return ByProjectKeyProductProjectionsGet 337 */ 338 public ByProjectKeyProductProjectionsGet addPriceCountry(final Supplier<String> supplier) { 339 return copy().addQueryParam("priceCountry", supplier.get()); 340 } 341 342 /** 343 * set priceCountry with the specified value 344 * @param op builder for the value to be set 345 * @return ByProjectKeyProductProjectionsGet 346 */ 347 public ByProjectKeyProductProjectionsGet withPriceCountry(final Function<StringBuilder, StringBuilder> op) { 348 return copy().withQueryParam("priceCountry", op.apply(new StringBuilder())); 349 } 350 351 /** 352 * add additional priceCountry query parameter 353 * @param op builder for the value to be added 354 * @return ByProjectKeyProductProjectionsGet 355 */ 356 public ByProjectKeyProductProjectionsGet addPriceCountry(final Function<StringBuilder, StringBuilder> op) { 357 return copy().addQueryParam("priceCountry", op.apply(new StringBuilder())); 358 } 359 360 /** 361 * set priceCountry with the specified values 362 * @param priceCountry values to be set 363 * @param <TValue> value type 364 * @return ByProjectKeyProductProjectionsGet 365 */ 366 public <TValue> ByProjectKeyProductProjectionsGet withPriceCountry(final Collection<TValue> priceCountry) { 367 return copy().withoutQueryParam("priceCountry") 368 .addQueryParams(priceCountry.stream() 369 .map(s -> new ParamEntry<>("priceCountry", s.toString())) 370 .collect(Collectors.toList())); 371 } 372 373 /** 374 * add additional priceCountry query parameters 375 * @param priceCountry values to be added 376 * @param <TValue> value type 377 * @return ByProjectKeyProductProjectionsGet 378 */ 379 public <TValue> ByProjectKeyProductProjectionsGet addPriceCountry(final Collection<TValue> priceCountry) { 380 return copy().addQueryParams(priceCountry.stream() 381 .map(s -> new ParamEntry<>("priceCountry", s.toString())) 382 .collect(Collectors.toList())); 383 } 384 385 /** 386 * set priceCustomerGroup with the specified value 387 * @param priceCustomerGroup value to be set 388 * @param <TValue> value type 389 * @return ByProjectKeyProductProjectionsGet 390 */ 391 public <TValue> ByProjectKeyProductProjectionsGet withPriceCustomerGroup(final TValue priceCustomerGroup) { 392 return copy().withQueryParam("priceCustomerGroup", priceCustomerGroup); 393 } 394 395 /** 396 * add additional priceCustomerGroup query parameter 397 * @param priceCustomerGroup value to be added 398 * @param <TValue> value type 399 * @return ByProjectKeyProductProjectionsGet 400 */ 401 public <TValue> ByProjectKeyProductProjectionsGet addPriceCustomerGroup(final TValue priceCustomerGroup) { 402 return copy().addQueryParam("priceCustomerGroup", priceCustomerGroup); 403 } 404 405 /** 406 * set priceCustomerGroup with the specified value 407 * @param supplier supplier for the value to be set 408 * @return ByProjectKeyProductProjectionsGet 409 */ 410 public ByProjectKeyProductProjectionsGet withPriceCustomerGroup(final Supplier<String> supplier) { 411 return copy().withQueryParam("priceCustomerGroup", supplier.get()); 412 } 413 414 /** 415 * add additional priceCustomerGroup query parameter 416 * @param supplier supplier for the value to be added 417 * @return ByProjectKeyProductProjectionsGet 418 */ 419 public ByProjectKeyProductProjectionsGet addPriceCustomerGroup(final Supplier<String> supplier) { 420 return copy().addQueryParam("priceCustomerGroup", supplier.get()); 421 } 422 423 /** 424 * set priceCustomerGroup with the specified value 425 * @param op builder for the value to be set 426 * @return ByProjectKeyProductProjectionsGet 427 */ 428 public ByProjectKeyProductProjectionsGet withPriceCustomerGroup(final Function<StringBuilder, StringBuilder> op) { 429 return copy().withQueryParam("priceCustomerGroup", op.apply(new StringBuilder())); 430 } 431 432 /** 433 * add additional priceCustomerGroup query parameter 434 * @param op builder for the value to be added 435 * @return ByProjectKeyProductProjectionsGet 436 */ 437 public ByProjectKeyProductProjectionsGet addPriceCustomerGroup(final Function<StringBuilder, StringBuilder> op) { 438 return copy().addQueryParam("priceCustomerGroup", op.apply(new StringBuilder())); 439 } 440 441 /** 442 * set priceCustomerGroup with the specified values 443 * @param priceCustomerGroup values to be set 444 * @param <TValue> value type 445 * @return ByProjectKeyProductProjectionsGet 446 */ 447 public <TValue> ByProjectKeyProductProjectionsGet withPriceCustomerGroup( 448 final Collection<TValue> priceCustomerGroup) { 449 return copy().withoutQueryParam("priceCustomerGroup") 450 .addQueryParams(priceCustomerGroup.stream() 451 .map(s -> new ParamEntry<>("priceCustomerGroup", s.toString())) 452 .collect(Collectors.toList())); 453 } 454 455 /** 456 * add additional priceCustomerGroup query parameters 457 * @param priceCustomerGroup values to be added 458 * @param <TValue> value type 459 * @return ByProjectKeyProductProjectionsGet 460 */ 461 public <TValue> ByProjectKeyProductProjectionsGet addPriceCustomerGroup( 462 final Collection<TValue> priceCustomerGroup) { 463 return copy().addQueryParams(priceCustomerGroup.stream() 464 .map(s -> new ParamEntry<>("priceCustomerGroup", s.toString())) 465 .collect(Collectors.toList())); 466 } 467 468 /** 469 * set priceChannel with the specified value 470 * @param priceChannel value to be set 471 * @param <TValue> value type 472 * @return ByProjectKeyProductProjectionsGet 473 */ 474 public <TValue> ByProjectKeyProductProjectionsGet withPriceChannel(final TValue priceChannel) { 475 return copy().withQueryParam("priceChannel", priceChannel); 476 } 477 478 /** 479 * add additional priceChannel query parameter 480 * @param priceChannel value to be added 481 * @param <TValue> value type 482 * @return ByProjectKeyProductProjectionsGet 483 */ 484 public <TValue> ByProjectKeyProductProjectionsGet addPriceChannel(final TValue priceChannel) { 485 return copy().addQueryParam("priceChannel", priceChannel); 486 } 487 488 /** 489 * set priceChannel with the specified value 490 * @param supplier supplier for the value to be set 491 * @return ByProjectKeyProductProjectionsGet 492 */ 493 public ByProjectKeyProductProjectionsGet withPriceChannel(final Supplier<String> supplier) { 494 return copy().withQueryParam("priceChannel", supplier.get()); 495 } 496 497 /** 498 * add additional priceChannel query parameter 499 * @param supplier supplier for the value to be added 500 * @return ByProjectKeyProductProjectionsGet 501 */ 502 public ByProjectKeyProductProjectionsGet addPriceChannel(final Supplier<String> supplier) { 503 return copy().addQueryParam("priceChannel", supplier.get()); 504 } 505 506 /** 507 * set priceChannel with the specified value 508 * @param op builder for the value to be set 509 * @return ByProjectKeyProductProjectionsGet 510 */ 511 public ByProjectKeyProductProjectionsGet withPriceChannel(final Function<StringBuilder, StringBuilder> op) { 512 return copy().withQueryParam("priceChannel", op.apply(new StringBuilder())); 513 } 514 515 /** 516 * add additional priceChannel query parameter 517 * @param op builder for the value to be added 518 * @return ByProjectKeyProductProjectionsGet 519 */ 520 public ByProjectKeyProductProjectionsGet addPriceChannel(final Function<StringBuilder, StringBuilder> op) { 521 return copy().addQueryParam("priceChannel", op.apply(new StringBuilder())); 522 } 523 524 /** 525 * set priceChannel with the specified values 526 * @param priceChannel values to be set 527 * @param <TValue> value type 528 * @return ByProjectKeyProductProjectionsGet 529 */ 530 public <TValue> ByProjectKeyProductProjectionsGet withPriceChannel(final Collection<TValue> priceChannel) { 531 return copy().withoutQueryParam("priceChannel") 532 .addQueryParams(priceChannel.stream() 533 .map(s -> new ParamEntry<>("priceChannel", s.toString())) 534 .collect(Collectors.toList())); 535 } 536 537 /** 538 * add additional priceChannel query parameters 539 * @param priceChannel values to be added 540 * @param <TValue> value type 541 * @return ByProjectKeyProductProjectionsGet 542 */ 543 public <TValue> ByProjectKeyProductProjectionsGet addPriceChannel(final Collection<TValue> priceChannel) { 544 return copy().addQueryParams(priceChannel.stream() 545 .map(s -> new ParamEntry<>("priceChannel", s.toString())) 546 .collect(Collectors.toList())); 547 } 548 549 /** 550 * set localeProjection with the specified value 551 * @param localeProjection value to be set 552 * @param <TValue> value type 553 * @return ByProjectKeyProductProjectionsGet 554 */ 555 public <TValue> ByProjectKeyProductProjectionsGet withLocaleProjection(final TValue localeProjection) { 556 return copy().withQueryParam("localeProjection", localeProjection); 557 } 558 559 /** 560 * add additional localeProjection query parameter 561 * @param localeProjection value to be added 562 * @param <TValue> value type 563 * @return ByProjectKeyProductProjectionsGet 564 */ 565 public <TValue> ByProjectKeyProductProjectionsGet addLocaleProjection(final TValue localeProjection) { 566 return copy().addQueryParam("localeProjection", localeProjection); 567 } 568 569 /** 570 * set localeProjection with the specified value 571 * @param supplier supplier for the value to be set 572 * @return ByProjectKeyProductProjectionsGet 573 */ 574 public ByProjectKeyProductProjectionsGet withLocaleProjection(final Supplier<String> supplier) { 575 return copy().withQueryParam("localeProjection", supplier.get()); 576 } 577 578 /** 579 * add additional localeProjection query parameter 580 * @param supplier supplier for the value to be added 581 * @return ByProjectKeyProductProjectionsGet 582 */ 583 public ByProjectKeyProductProjectionsGet addLocaleProjection(final Supplier<String> supplier) { 584 return copy().addQueryParam("localeProjection", supplier.get()); 585 } 586 587 /** 588 * set localeProjection with the specified value 589 * @param op builder for the value to be set 590 * @return ByProjectKeyProductProjectionsGet 591 */ 592 public ByProjectKeyProductProjectionsGet withLocaleProjection(final Function<StringBuilder, StringBuilder> op) { 593 return copy().withQueryParam("localeProjection", op.apply(new StringBuilder())); 594 } 595 596 /** 597 * add additional localeProjection query parameter 598 * @param op builder for the value to be added 599 * @return ByProjectKeyProductProjectionsGet 600 */ 601 public ByProjectKeyProductProjectionsGet addLocaleProjection(final Function<StringBuilder, StringBuilder> op) { 602 return copy().addQueryParam("localeProjection", op.apply(new StringBuilder())); 603 } 604 605 /** 606 * set localeProjection with the specified values 607 * @param localeProjection values to be set 608 * @param <TValue> value type 609 * @return ByProjectKeyProductProjectionsGet 610 */ 611 public <TValue> ByProjectKeyProductProjectionsGet withLocaleProjection(final Collection<TValue> localeProjection) { 612 return copy().withoutQueryParam("localeProjection") 613 .addQueryParams(localeProjection.stream() 614 .map(s -> new ParamEntry<>("localeProjection", s.toString())) 615 .collect(Collectors.toList())); 616 } 617 618 /** 619 * add additional localeProjection query parameters 620 * @param localeProjection values to be added 621 * @param <TValue> value type 622 * @return ByProjectKeyProductProjectionsGet 623 */ 624 public <TValue> ByProjectKeyProductProjectionsGet addLocaleProjection(final Collection<TValue> localeProjection) { 625 return copy().addQueryParams(localeProjection.stream() 626 .map(s -> new ParamEntry<>("localeProjection", s.toString())) 627 .collect(Collectors.toList())); 628 } 629 630 /** 631 * set storeProjection with the specified value 632 * @param storeProjection value to be set 633 * @param <TValue> value type 634 * @return ByProjectKeyProductProjectionsGet 635 */ 636 public <TValue> ByProjectKeyProductProjectionsGet withStoreProjection(final TValue storeProjection) { 637 return copy().withQueryParam("storeProjection", storeProjection); 638 } 639 640 /** 641 * add additional storeProjection query parameter 642 * @param storeProjection value to be added 643 * @param <TValue> value type 644 * @return ByProjectKeyProductProjectionsGet 645 */ 646 public <TValue> ByProjectKeyProductProjectionsGet addStoreProjection(final TValue storeProjection) { 647 return copy().addQueryParam("storeProjection", storeProjection); 648 } 649 650 /** 651 * set storeProjection with the specified value 652 * @param supplier supplier for the value to be set 653 * @return ByProjectKeyProductProjectionsGet 654 */ 655 public ByProjectKeyProductProjectionsGet withStoreProjection(final Supplier<String> supplier) { 656 return copy().withQueryParam("storeProjection", supplier.get()); 657 } 658 659 /** 660 * add additional storeProjection query parameter 661 * @param supplier supplier for the value to be added 662 * @return ByProjectKeyProductProjectionsGet 663 */ 664 public ByProjectKeyProductProjectionsGet addStoreProjection(final Supplier<String> supplier) { 665 return copy().addQueryParam("storeProjection", supplier.get()); 666 } 667 668 /** 669 * set storeProjection with the specified value 670 * @param op builder for the value to be set 671 * @return ByProjectKeyProductProjectionsGet 672 */ 673 public ByProjectKeyProductProjectionsGet withStoreProjection(final Function<StringBuilder, StringBuilder> op) { 674 return copy().withQueryParam("storeProjection", op.apply(new StringBuilder())); 675 } 676 677 /** 678 * add additional storeProjection query parameter 679 * @param op builder for the value to be added 680 * @return ByProjectKeyProductProjectionsGet 681 */ 682 public ByProjectKeyProductProjectionsGet addStoreProjection(final Function<StringBuilder, StringBuilder> op) { 683 return copy().addQueryParam("storeProjection", op.apply(new StringBuilder())); 684 } 685 686 /** 687 * set storeProjection with the specified values 688 * @param storeProjection values to be set 689 * @param <TValue> value type 690 * @return ByProjectKeyProductProjectionsGet 691 */ 692 public <TValue> ByProjectKeyProductProjectionsGet withStoreProjection(final Collection<TValue> storeProjection) { 693 return copy().withoutQueryParam("storeProjection") 694 .addQueryParams(storeProjection.stream() 695 .map(s -> new ParamEntry<>("storeProjection", s.toString())) 696 .collect(Collectors.toList())); 697 } 698 699 /** 700 * add additional storeProjection query parameters 701 * @param storeProjection values to be added 702 * @param <TValue> value type 703 * @return ByProjectKeyProductProjectionsGet 704 */ 705 public <TValue> ByProjectKeyProductProjectionsGet addStoreProjection(final Collection<TValue> storeProjection) { 706 return copy().addQueryParams(storeProjection.stream() 707 .map(s -> new ParamEntry<>("storeProjection", s.toString())) 708 .collect(Collectors.toList())); 709 } 710 711 /** 712 * set expand with the specified value 713 * @param expand value to be set 714 * @param <TValue> value type 715 * @return ByProjectKeyProductProjectionsGet 716 */ 717 public <TValue> ByProjectKeyProductProjectionsGet withExpand(final TValue expand) { 718 return copy().withQueryParam("expand", expand); 719 } 720 721 /** 722 * add additional expand query parameter 723 * @param expand value to be added 724 * @param <TValue> value type 725 * @return ByProjectKeyProductProjectionsGet 726 */ 727 public <TValue> ByProjectKeyProductProjectionsGet addExpand(final TValue expand) { 728 return copy().addQueryParam("expand", expand); 729 } 730 731 /** 732 * set expand with the specified value 733 * @param supplier supplier for the value to be set 734 * @return ByProjectKeyProductProjectionsGet 735 */ 736 public ByProjectKeyProductProjectionsGet withExpand(final Supplier<String> supplier) { 737 return copy().withQueryParam("expand", supplier.get()); 738 } 739 740 /** 741 * add additional expand query parameter 742 * @param supplier supplier for the value to be added 743 * @return ByProjectKeyProductProjectionsGet 744 */ 745 public ByProjectKeyProductProjectionsGet addExpand(final Supplier<String> supplier) { 746 return copy().addQueryParam("expand", supplier.get()); 747 } 748 749 /** 750 * set expand with the specified value 751 * @param op builder for the value to be set 752 * @return ByProjectKeyProductProjectionsGet 753 */ 754 public ByProjectKeyProductProjectionsGet withExpand(final Function<StringBuilder, StringBuilder> op) { 755 return copy().withQueryParam("expand", op.apply(new StringBuilder())); 756 } 757 758 /** 759 * add additional expand query parameter 760 * @param op builder for the value to be added 761 * @return ByProjectKeyProductProjectionsGet 762 */ 763 public ByProjectKeyProductProjectionsGet addExpand(final Function<StringBuilder, StringBuilder> op) { 764 return copy().addQueryParam("expand", op.apply(new StringBuilder())); 765 } 766 767 /** 768 * set expand with the specified values 769 * @param expand values to be set 770 * @param <TValue> value type 771 * @return ByProjectKeyProductProjectionsGet 772 */ 773 public <TValue> ByProjectKeyProductProjectionsGet withExpand(final Collection<TValue> expand) { 774 return copy().withoutQueryParam("expand") 775 .addQueryParams( 776 expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); 777 } 778 779 /** 780 * add additional expand query parameters 781 * @param expand values to be added 782 * @param <TValue> value type 783 * @return ByProjectKeyProductProjectionsGet 784 */ 785 public <TValue> ByProjectKeyProductProjectionsGet addExpand(final Collection<TValue> expand) { 786 return copy().addQueryParams( 787 expand.stream().map(s -> new ParamEntry<>("expand", s.toString())).collect(Collectors.toList())); 788 } 789 790 /** 791 * set sort with the specified value 792 * @param sort value to be set 793 * @param <TValue> value type 794 * @return ByProjectKeyProductProjectionsGet 795 */ 796 public <TValue> ByProjectKeyProductProjectionsGet withSort(final TValue sort) { 797 return copy().withQueryParam("sort", sort); 798 } 799 800 /** 801 * add additional sort query parameter 802 * @param sort value to be added 803 * @param <TValue> value type 804 * @return ByProjectKeyProductProjectionsGet 805 */ 806 public <TValue> ByProjectKeyProductProjectionsGet addSort(final TValue sort) { 807 return copy().addQueryParam("sort", sort); 808 } 809 810 /** 811 * set sort with the specified value 812 * @param supplier supplier for the value to be set 813 * @return ByProjectKeyProductProjectionsGet 814 */ 815 public ByProjectKeyProductProjectionsGet withSort(final Supplier<String> supplier) { 816 return copy().withQueryParam("sort", supplier.get()); 817 } 818 819 /** 820 * add additional sort query parameter 821 * @param supplier supplier for the value to be added 822 * @return ByProjectKeyProductProjectionsGet 823 */ 824 public ByProjectKeyProductProjectionsGet addSort(final Supplier<String> supplier) { 825 return copy().addQueryParam("sort", supplier.get()); 826 } 827 828 /** 829 * set sort with the specified value 830 * @param op builder for the value to be set 831 * @return ByProjectKeyProductProjectionsGet 832 */ 833 public ByProjectKeyProductProjectionsGet withSort(final Function<StringBuilder, StringBuilder> op) { 834 return copy().withQueryParam("sort", op.apply(new StringBuilder())); 835 } 836 837 /** 838 * add additional sort query parameter 839 * @param op builder for the value to be added 840 * @return ByProjectKeyProductProjectionsGet 841 */ 842 public ByProjectKeyProductProjectionsGet addSort(final Function<StringBuilder, StringBuilder> op) { 843 return copy().addQueryParam("sort", op.apply(new StringBuilder())); 844 } 845 846 /** 847 * set sort with the specified values 848 * @param sort values to be set 849 * @param <TValue> value type 850 * @return ByProjectKeyProductProjectionsGet 851 */ 852 public <TValue> ByProjectKeyProductProjectionsGet withSort(final Collection<TValue> sort) { 853 return copy().withoutQueryParam("sort") 854 .addQueryParams( 855 sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); 856 } 857 858 /** 859 * add additional sort query parameters 860 * @param sort values to be added 861 * @param <TValue> value type 862 * @return ByProjectKeyProductProjectionsGet 863 */ 864 public <TValue> ByProjectKeyProductProjectionsGet addSort(final Collection<TValue> sort) { 865 return copy().addQueryParams( 866 sort.stream().map(s -> new ParamEntry<>("sort", s.toString())).collect(Collectors.toList())); 867 } 868 869 /** 870 * set limit with the specified value 871 * @param limit value to be set 872 * @param <TValue> value type 873 * @return ByProjectKeyProductProjectionsGet 874 */ 875 public <TValue> ByProjectKeyProductProjectionsGet withLimit(final TValue limit) { 876 return copy().withQueryParam("limit", limit); 877 } 878 879 /** 880 * add additional limit query parameter 881 * @param limit value to be added 882 * @param <TValue> value type 883 * @return ByProjectKeyProductProjectionsGet 884 */ 885 public <TValue> ByProjectKeyProductProjectionsGet addLimit(final TValue limit) { 886 return copy().addQueryParam("limit", limit); 887 } 888 889 /** 890 * set limit with the specified value 891 * @param supplier supplier for the value to be set 892 * @return ByProjectKeyProductProjectionsGet 893 */ 894 public ByProjectKeyProductProjectionsGet withLimit(final Supplier<Integer> supplier) { 895 return copy().withQueryParam("limit", supplier.get()); 896 } 897 898 /** 899 * add additional limit query parameter 900 * @param supplier supplier for the value to be added 901 * @return ByProjectKeyProductProjectionsGet 902 */ 903 public ByProjectKeyProductProjectionsGet addLimit(final Supplier<Integer> supplier) { 904 return copy().addQueryParam("limit", supplier.get()); 905 } 906 907 /** 908 * set limit with the specified value 909 * @param op builder for the value to be set 910 * @return ByProjectKeyProductProjectionsGet 911 */ 912 public ByProjectKeyProductProjectionsGet withLimit(final Function<StringBuilder, StringBuilder> op) { 913 return copy().withQueryParam("limit", op.apply(new StringBuilder())); 914 } 915 916 /** 917 * add additional limit query parameter 918 * @param op builder for the value to be added 919 * @return ByProjectKeyProductProjectionsGet 920 */ 921 public ByProjectKeyProductProjectionsGet addLimit(final Function<StringBuilder, StringBuilder> op) { 922 return copy().addQueryParam("limit", op.apply(new StringBuilder())); 923 } 924 925 /** 926 * set limit with the specified values 927 * @param limit values to be set 928 * @param <TValue> value type 929 * @return ByProjectKeyProductProjectionsGet 930 */ 931 public <TValue> ByProjectKeyProductProjectionsGet withLimit(final Collection<TValue> limit) { 932 return copy().withoutQueryParam("limit") 933 .addQueryParams( 934 limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); 935 } 936 937 /** 938 * add additional limit query parameters 939 * @param limit values to be added 940 * @param <TValue> value type 941 * @return ByProjectKeyProductProjectionsGet 942 */ 943 public <TValue> ByProjectKeyProductProjectionsGet addLimit(final Collection<TValue> limit) { 944 return copy().addQueryParams( 945 limit.stream().map(s -> new ParamEntry<>("limit", s.toString())).collect(Collectors.toList())); 946 } 947 948 /** 949 * set offset with the specified value 950 * @param offset value to be set 951 * @param <TValue> value type 952 * @return ByProjectKeyProductProjectionsGet 953 */ 954 public <TValue> ByProjectKeyProductProjectionsGet withOffset(final TValue offset) { 955 return copy().withQueryParam("offset", offset); 956 } 957 958 /** 959 * add additional offset query parameter 960 * @param offset value to be added 961 * @param <TValue> value type 962 * @return ByProjectKeyProductProjectionsGet 963 */ 964 public <TValue> ByProjectKeyProductProjectionsGet addOffset(final TValue offset) { 965 return copy().addQueryParam("offset", offset); 966 } 967 968 /** 969 * set offset with the specified value 970 * @param supplier supplier for the value to be set 971 * @return ByProjectKeyProductProjectionsGet 972 */ 973 public ByProjectKeyProductProjectionsGet withOffset(final Supplier<Integer> supplier) { 974 return copy().withQueryParam("offset", supplier.get()); 975 } 976 977 /** 978 * add additional offset query parameter 979 * @param supplier supplier for the value to be added 980 * @return ByProjectKeyProductProjectionsGet 981 */ 982 public ByProjectKeyProductProjectionsGet addOffset(final Supplier<Integer> supplier) { 983 return copy().addQueryParam("offset", supplier.get()); 984 } 985 986 /** 987 * set offset with the specified value 988 * @param op builder for the value to be set 989 * @return ByProjectKeyProductProjectionsGet 990 */ 991 public ByProjectKeyProductProjectionsGet withOffset(final Function<StringBuilder, StringBuilder> op) { 992 return copy().withQueryParam("offset", op.apply(new StringBuilder())); 993 } 994 995 /** 996 * add additional offset query parameter 997 * @param op builder for the value to be added 998 * @return ByProjectKeyProductProjectionsGet 999 */ 1000 public ByProjectKeyProductProjectionsGet addOffset(final Function<StringBuilder, StringBuilder> op) { 1001 return copy().addQueryParam("offset", op.apply(new StringBuilder())); 1002 } 1003 1004 /** 1005 * set offset with the specified values 1006 * @param offset values to be set 1007 * @param <TValue> value type 1008 * @return ByProjectKeyProductProjectionsGet 1009 */ 1010 public <TValue> ByProjectKeyProductProjectionsGet withOffset(final Collection<TValue> offset) { 1011 return copy().withoutQueryParam("offset") 1012 .addQueryParams( 1013 offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); 1014 } 1015 1016 /** 1017 * add additional offset query parameters 1018 * @param offset values to be added 1019 * @param <TValue> value type 1020 * @return ByProjectKeyProductProjectionsGet 1021 */ 1022 public <TValue> ByProjectKeyProductProjectionsGet addOffset(final Collection<TValue> offset) { 1023 return copy().addQueryParams( 1024 offset.stream().map(s -> new ParamEntry<>("offset", s.toString())).collect(Collectors.toList())); 1025 } 1026 1027 /** 1028 * set withTotal with the specified value 1029 * @param withTotal value to be set 1030 * @param <TValue> value type 1031 * @return ByProjectKeyProductProjectionsGet 1032 */ 1033 public <TValue> ByProjectKeyProductProjectionsGet withWithTotal(final TValue withTotal) { 1034 return copy().withQueryParam("withTotal", withTotal); 1035 } 1036 1037 /** 1038 * add additional withTotal query parameter 1039 * @param withTotal value to be added 1040 * @param <TValue> value type 1041 * @return ByProjectKeyProductProjectionsGet 1042 */ 1043 public <TValue> ByProjectKeyProductProjectionsGet addWithTotal(final TValue withTotal) { 1044 return copy().addQueryParam("withTotal", withTotal); 1045 } 1046 1047 /** 1048 * set withTotal with the specified value 1049 * @param supplier supplier for the value to be set 1050 * @return ByProjectKeyProductProjectionsGet 1051 */ 1052 public ByProjectKeyProductProjectionsGet withWithTotal(final Supplier<Boolean> supplier) { 1053 return copy().withQueryParam("withTotal", supplier.get()); 1054 } 1055 1056 /** 1057 * add additional withTotal query parameter 1058 * @param supplier supplier for the value to be added 1059 * @return ByProjectKeyProductProjectionsGet 1060 */ 1061 public ByProjectKeyProductProjectionsGet addWithTotal(final Supplier<Boolean> supplier) { 1062 return copy().addQueryParam("withTotal", supplier.get()); 1063 } 1064 1065 /** 1066 * set withTotal with the specified value 1067 * @param op builder for the value to be set 1068 * @return ByProjectKeyProductProjectionsGet 1069 */ 1070 public ByProjectKeyProductProjectionsGet withWithTotal(final Function<StringBuilder, StringBuilder> op) { 1071 return copy().withQueryParam("withTotal", op.apply(new StringBuilder())); 1072 } 1073 1074 /** 1075 * add additional withTotal query parameter 1076 * @param op builder for the value to be added 1077 * @return ByProjectKeyProductProjectionsGet 1078 */ 1079 public ByProjectKeyProductProjectionsGet addWithTotal(final Function<StringBuilder, StringBuilder> op) { 1080 return copy().addQueryParam("withTotal", op.apply(new StringBuilder())); 1081 } 1082 1083 /** 1084 * set withTotal with the specified values 1085 * @param withTotal values to be set 1086 * @param <TValue> value type 1087 * @return ByProjectKeyProductProjectionsGet 1088 */ 1089 public <TValue> ByProjectKeyProductProjectionsGet withWithTotal(final Collection<TValue> withTotal) { 1090 return copy().withoutQueryParam("withTotal") 1091 .addQueryParams(withTotal.stream() 1092 .map(s -> new ParamEntry<>("withTotal", s.toString())) 1093 .collect(Collectors.toList())); 1094 } 1095 1096 /** 1097 * add additional withTotal query parameters 1098 * @param withTotal values to be added 1099 * @param <TValue> value type 1100 * @return ByProjectKeyProductProjectionsGet 1101 */ 1102 public <TValue> ByProjectKeyProductProjectionsGet addWithTotal(final Collection<TValue> withTotal) { 1103 return copy().addQueryParams( 1104 withTotal.stream().map(s -> new ParamEntry<>("withTotal", s.toString())).collect(Collectors.toList())); 1105 } 1106 1107 /** 1108 * set where with the specified value 1109 * @param where value to be set 1110 * @param <TValue> value type 1111 * @return ByProjectKeyProductProjectionsGet 1112 */ 1113 public <TValue> ByProjectKeyProductProjectionsGet withWhere(final TValue where) { 1114 return copy().withQueryParam("where", where); 1115 } 1116 1117 /** 1118 * add additional where query parameter 1119 * @param where value to be added 1120 * @param <TValue> value type 1121 * @return ByProjectKeyProductProjectionsGet 1122 */ 1123 public <TValue> ByProjectKeyProductProjectionsGet addWhere(final TValue where) { 1124 return copy().addQueryParam("where", where); 1125 } 1126 1127 /** 1128 * set where with the specified value 1129 * @param supplier supplier for the value to be set 1130 * @return ByProjectKeyProductProjectionsGet 1131 */ 1132 public ByProjectKeyProductProjectionsGet withWhere(final Supplier<String> supplier) { 1133 return copy().withQueryParam("where", supplier.get()); 1134 } 1135 1136 /** 1137 * add additional where query parameter 1138 * @param supplier supplier for the value to be added 1139 * @return ByProjectKeyProductProjectionsGet 1140 */ 1141 public ByProjectKeyProductProjectionsGet addWhere(final Supplier<String> supplier) { 1142 return copy().addQueryParam("where", supplier.get()); 1143 } 1144 1145 /** 1146 * set where with the specified value 1147 * @param op builder for the value to be set 1148 * @return ByProjectKeyProductProjectionsGet 1149 */ 1150 public ByProjectKeyProductProjectionsGet withWhere(final Function<StringBuilder, StringBuilder> op) { 1151 return copy().withQueryParam("where", op.apply(new StringBuilder())); 1152 } 1153 1154 /** 1155 * add additional where query parameter 1156 * @param op builder for the value to be added 1157 * @return ByProjectKeyProductProjectionsGet 1158 */ 1159 public ByProjectKeyProductProjectionsGet addWhere(final Function<StringBuilder, StringBuilder> op) { 1160 return copy().addQueryParam("where", op.apply(new StringBuilder())); 1161 } 1162 1163 /** 1164 * set where with the specified values 1165 * @param where values to be set 1166 * @param <TValue> value type 1167 * @return ByProjectKeyProductProjectionsGet 1168 */ 1169 public <TValue> ByProjectKeyProductProjectionsGet withWhere(final Collection<TValue> where) { 1170 return copy().withoutQueryParam("where") 1171 .addQueryParams( 1172 where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); 1173 } 1174 1175 /** 1176 * add additional where query parameters 1177 * @param where values to be added 1178 * @param <TValue> value type 1179 * @return ByProjectKeyProductProjectionsGet 1180 */ 1181 public <TValue> ByProjectKeyProductProjectionsGet addWhere(final Collection<TValue> where) { 1182 return copy().addQueryParams( 1183 where.stream().map(s -> new ParamEntry<>("where", s.toString())).collect(Collectors.toList())); 1184 } 1185 1186 /** 1187 * set predicateVar with the specificied value 1188 * @param <TValue> value type 1189 * @param varName parameter name 1190 * @param predicateVar parameter value 1191 * @return ByProjectKeyProductProjectionsGet 1192 */ 1193 public <TValue> ByProjectKeyProductProjectionsGet withPredicateVar(final String varName, 1194 final TValue predicateVar) { 1195 return copy().withQueryParam(String.format("var.%s", varName), predicateVar); 1196 } 1197 1198 /** 1199 * add additional predicateVar query parameter 1200 * @param <TValue> value type 1201 * @param varName parameter name 1202 * @param predicateVar parameter value 1203 * @return ByProjectKeyProductProjectionsGet 1204 */ 1205 public <TValue> ByProjectKeyProductProjectionsGet addPredicateVar(final String varName, final TValue predicateVar) { 1206 return copy().addQueryParam(String.format("var.%s", varName), predicateVar); 1207 } 1208 1209 /** 1210 * set predicateVar with the specificied values 1211 * @param <TValue> value type 1212 * @param varName parameter name 1213 * @param predicateVar parameter values 1214 * @return ByProjectKeyProductProjectionsGet 1215 */ 1216 public <TValue> ByProjectKeyProductProjectionsGet withPredicateVar(final String varName, 1217 final Collection<TValue> predicateVar) { 1218 final String placeholderName = String.format("var.%s", varName); 1219 return copy().withoutQueryParam(placeholderName) 1220 .addQueryParams(predicateVar.stream() 1221 .map(s -> new ParamEntry<>(placeholderName, s.toString())) 1222 .collect(Collectors.toList())); 1223 } 1224 1225 /** 1226 * add additional predicateVar query parameters 1227 * @param <TValue> value type 1228 * @param varName parameter name 1229 * @param predicateVar parameter values 1230 * @return ByProjectKeyProductProjectionsGet 1231 */ 1232 public <TValue> ByProjectKeyProductProjectionsGet addPredicateVar(final String varName, 1233 final Collection<TValue> predicateVar) { 1234 final String placeholderName = String.format("var.%s", varName); 1235 return copy().addQueryParams(predicateVar.stream() 1236 .map(s -> new ParamEntry<>(placeholderName, s.toString())) 1237 .collect(Collectors.toList())); 1238 } 1239 1240 @Override 1241 public boolean equals(Object o) { 1242 if (this == o) 1243 return true; 1244 1245 if (o == null || getClass() != o.getClass()) 1246 return false; 1247 1248 ByProjectKeyProductProjectionsGet that = (ByProjectKeyProductProjectionsGet) o; 1249 1250 return new EqualsBuilder().append(projectKey, that.projectKey).isEquals(); 1251 } 1252 1253 @Override 1254 public int hashCode() { 1255 return new HashCodeBuilder(17, 37).append(projectKey).toHashCode(); 1256 } 1257 1258 @Override 1259 protected ByProjectKeyProductProjectionsGet copy() { 1260 return new ByProjectKeyProductProjectionsGet(this); 1261 } 1262}