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 * OrderLabel
018 *
019 * <hr>
020 * Example to create an instance using the builder pattern
021 * <div class=code-example>
022 * <pre><code class='java'>
023 *     OrderLabel orderLabel = OrderLabel.builder()
024 *             .customerEmail("{customerEmail}")
025 *             .orderNumber("{orderNumber}")
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 = OrderLabelImpl.class)
032public interface OrderLabel extends Label {
033
034    /**
035     * discriminator value for OrderLabel
036     */
037    String ORDER_LABEL = "OrderLabel";
038
039    /**
040     *
041     * @return type
042     */
043    @NotNull
044    @JsonProperty("type")
045    public String getType();
046
047    /**
048     *  <p>Email address of the Customer that the Order belongs to.</p>
049     * @return customerEmail
050     */
051    @NotNull
052    @JsonProperty("customerEmail")
053    public String getCustomerEmail();
054
055    /**
056     *  <p>User-defined unique identifier of the Order that is unique across a Project.</p>
057     * @return orderNumber
058     */
059    @NotNull
060    @JsonProperty("orderNumber")
061    public String getOrderNumber();
062
063    /**
064     *  <p>Email address of the Customer that the Order belongs to.</p>
065     * @param customerEmail value to be set
066     */
067
068    public void setCustomerEmail(final String customerEmail);
069
070    /**
071     *  <p>User-defined unique identifier of the Order that is unique across a Project.</p>
072     * @param orderNumber value to be set
073     */
074
075    public void setOrderNumber(final String orderNumber);
076
077    /**
078     * factory method
079     * @return instance of OrderLabel
080     */
081    public static OrderLabel of() {
082        return new OrderLabelImpl();
083    }
084
085    /**
086     * factory method to create a shallow copy OrderLabel
087     * @param template instance to be copied
088     * @return copy instance
089     */
090    public static OrderLabel of(final OrderLabel template) {
091        OrderLabelImpl instance = new OrderLabelImpl();
092        instance.setCustomerEmail(template.getCustomerEmail());
093        instance.setOrderNumber(template.getOrderNumber());
094        return instance;
095    }
096
097    /**
098     * factory method to create a deep copy of OrderLabel
099     * @param template instance to be copied
100     * @return copy instance
101     */
102    @Nullable
103    public static OrderLabel deepCopy(@Nullable final OrderLabel template) {
104        if (template == null) {
105            return null;
106        }
107        OrderLabelImpl instance = new OrderLabelImpl();
108        instance.setCustomerEmail(template.getCustomerEmail());
109        instance.setOrderNumber(template.getOrderNumber());
110        return instance;
111    }
112
113    /**
114     * builder factory method for OrderLabel
115     * @return builder
116     */
117    public static OrderLabelBuilder builder() {
118        return OrderLabelBuilder.of();
119    }
120
121    /**
122     * create builder for OrderLabel instance
123     * @param template instance with prefilled values for the builder
124     * @return builder
125     */
126    public static OrderLabelBuilder builder(final OrderLabel template) {
127        return OrderLabelBuilder.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 withOrderLabel(Function<OrderLabel, 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<OrderLabel> typeReference() {
145        return new com.fasterxml.jackson.core.type.TypeReference<OrderLabel>() {
146            @Override
147            public String toString() {
148                return "TypeReference<OrderLabel>";
149            }
150        };
151    }
152}