001
002package com.commercetools.history.models.label;
003
004import java.time.*;
005import java.util.*;
006import java.util.function.Function;
007
008import javax.annotation.Nullable;
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 * ReviewLabel
018 *
019 * <hr>
020 * Example to create an instance using the builder pattern
021 * <div class=code-example>
022 * <pre><code class='java'>
023 *     ReviewLabel reviewLabel = ReviewLabel.builder()
024 *             .key("{key}")
025 *             .title("{title}")
026 *             .build()
027 * </code></pre>
028 * </div>
029 */
030@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
031@JsonDeserialize(as = ReviewLabelImpl.class)
032public interface ReviewLabel extends Label {
033
034    /**
035     * discriminator value for ReviewLabel
036     */
037    String REVIEW_LABEL = "ReviewLabel";
038
039    /**
040     *
041     * @return type
042     */
043    @NotNull
044    @JsonProperty("type")
045    public String getType();
046
047    /**
048     *  <p>User-defined unique identifier of the Review.</p>
049     * @return key
050     */
051    @NotNull
052    @JsonProperty("key")
053    public String getKey();
054
055    /**
056     *  <p>Title of the Review.</p>
057     * @return title
058     */
059    @NotNull
060    @JsonProperty("title")
061    public String getTitle();
062
063    /**
064     *  <p>User-defined unique identifier of the Review.</p>
065     * @param key value to be set
066     */
067
068    public void setKey(final String key);
069
070    /**
071     *  <p>Title of the Review.</p>
072     * @param title value to be set
073     */
074
075    public void setTitle(final String title);
076
077    /**
078     * factory method
079     * @return instance of ReviewLabel
080     */
081    public static ReviewLabel of() {
082        return new ReviewLabelImpl();
083    }
084
085    /**
086     * factory method to create a shallow copy ReviewLabel
087     * @param template instance to be copied
088     * @return copy instance
089     */
090    public static ReviewLabel of(final ReviewLabel template) {
091        ReviewLabelImpl instance = new ReviewLabelImpl();
092        instance.setKey(template.getKey());
093        instance.setTitle(template.getTitle());
094        return instance;
095    }
096
097    /**
098     * factory method to create a deep copy of ReviewLabel
099     * @param template instance to be copied
100     * @return copy instance
101     */
102    @Nullable
103    public static ReviewLabel deepCopy(@Nullable final ReviewLabel template) {
104        if (template == null) {
105            return null;
106        }
107        ReviewLabelImpl instance = new ReviewLabelImpl();
108        instance.setKey(template.getKey());
109        instance.setTitle(template.getTitle());
110        return instance;
111    }
112
113    /**
114     * builder factory method for ReviewLabel
115     * @return builder
116     */
117    public static ReviewLabelBuilder builder() {
118        return ReviewLabelBuilder.of();
119    }
120
121    /**
122     * create builder for ReviewLabel instance
123     * @param template instance with prefilled values for the builder
124     * @return builder
125     */
126    public static ReviewLabelBuilder builder(final ReviewLabel template) {
127        return ReviewLabelBuilder.of(template);
128    }
129
130    /**
131     * accessor map function
132     * @param <T> mapped type
133     * @param helper function to map the object
134     * @return mapped value
135     */
136    default <T> T withReviewLabel(Function<ReviewLabel, T> helper) {
137        return helper.apply(this);
138    }
139
140    /**
141     * gives a TypeReference for usage with Jackson DataBind
142     * @return TypeReference
143     */
144    public static com.fasterxml.jackson.core.type.TypeReference<ReviewLabel> typeReference() {
145        return new com.fasterxml.jackson.core.type.TypeReference<ReviewLabel>() {
146            @Override
147            public String toString() {
148                return "TypeReference<ReviewLabel>";
149            }
150        };
151    }
152}