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