001
002package com.commercetools.ml.models.category_recommendations;
003
004import java.time.*;
005import java.util.*;
006import java.util.function.Function;
007
008import javax.validation.Valid;
009import javax.validation.constraints.NotNull;
010
011import com.fasterxml.jackson.annotation.*;
012import com.fasterxml.jackson.databind.annotation.*;
013
014import io.vrap.rmf.base.client.utils.Generated;
015
016/**
017 * ProjectCategoryRecommendationPagedQueryResponse
018 *
019 * <hr>
020 * Example to create an instance using the builder pattern
021 * <div class=code-example>
022 * <pre><code class='java'>
023 *     ProjectCategoryRecommendationPagedQueryResponse projectCategoryRecommendationPagedQueryResponse = ProjectCategoryRecommendationPagedQueryResponse.builder()
024 *             .count(0.3)
025 *             .total(0.3)
026 *             .offset(0.3)
027 *             .plusResults(resultsBuilder -> resultsBuilder)
028 *             .meta(metaBuilder -> metaBuilder)
029 *             .build()
030 * </code></pre>
031 * </div>
032 */
033@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
034@JsonDeserialize(as = ProjectCategoryRecommendationPagedQueryResponseImpl.class)
035public interface ProjectCategoryRecommendationPagedQueryResponse {
036
037    /**
038     *
039     */
040    @NotNull
041    @JsonProperty("count")
042    public Long getCount();
043
044    /**
045     *
046     */
047    @NotNull
048    @JsonProperty("total")
049    public Long getTotal();
050
051    /**
052     *  <p>Number of elements skipped.</p>
053     */
054    @NotNull
055    @JsonProperty("offset")
056    public Long getOffset();
057
058    /**
059     *
060     */
061    @NotNull
062    @Valid
063    @JsonProperty("results")
064    public List<ProjectCategoryRecommendation> getResults();
065
066    /**
067     *
068     */
069    @NotNull
070    @Valid
071    @JsonProperty("meta")
072    public ProjectCategoryRecommendationMeta getMeta();
073
074    public void setCount(final Long count);
075
076    public void setTotal(final Long total);
077
078    public void setOffset(final Long offset);
079
080    @JsonIgnore
081    public void setResults(final ProjectCategoryRecommendation... results);
082
083    public void setResults(final List<ProjectCategoryRecommendation> results);
084
085    public void setMeta(final ProjectCategoryRecommendationMeta meta);
086
087    public static ProjectCategoryRecommendationPagedQueryResponse of() {
088        return new ProjectCategoryRecommendationPagedQueryResponseImpl();
089    }
090
091    public static ProjectCategoryRecommendationPagedQueryResponse of(
092            final ProjectCategoryRecommendationPagedQueryResponse template) {
093        ProjectCategoryRecommendationPagedQueryResponseImpl instance = new ProjectCategoryRecommendationPagedQueryResponseImpl();
094        instance.setCount(template.getCount());
095        instance.setTotal(template.getTotal());
096        instance.setOffset(template.getOffset());
097        instance.setResults(template.getResults());
098        instance.setMeta(template.getMeta());
099        return instance;
100    }
101
102    public static ProjectCategoryRecommendationPagedQueryResponseBuilder builder() {
103        return ProjectCategoryRecommendationPagedQueryResponseBuilder.of();
104    }
105
106    public static ProjectCategoryRecommendationPagedQueryResponseBuilder builder(
107            final ProjectCategoryRecommendationPagedQueryResponse template) {
108        return ProjectCategoryRecommendationPagedQueryResponseBuilder.of(template);
109    }
110
111    default <T> T withProjectCategoryRecommendationPagedQueryResponse(
112            Function<ProjectCategoryRecommendationPagedQueryResponse, T> helper) {
113        return helper.apply(this);
114    }
115
116    public static com.fasterxml.jackson.core.type.TypeReference<ProjectCategoryRecommendationPagedQueryResponse> typeReference() {
117        return new com.fasterxml.jackson.core.type.TypeReference<ProjectCategoryRecommendationPagedQueryResponse>() {
118            @Override
119            public String toString() {
120                return "TypeReference<ProjectCategoryRecommendationPagedQueryResponse>";
121            }
122        };
123    }
124}