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