001
002package com.commercetools.history.models.change;
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 *  <p>Change triggered by the Set InterfaceId update action.</p>
018 *
019 * <hr>
020 * Example to create an instance using the builder pattern
021 * <div class=code-example>
022 * <pre><code class='java'>
023 *     SetInterfaceIdChange setInterfaceIdChange = SetInterfaceIdChange.builder()
024 *             .change("{change}")
025 *             .previousValue("{previousValue}")
026 *             .nextValue("{nextValue}")
027 *             .build()
028 * </code></pre>
029 * </div>
030 */
031@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
032@JsonDeserialize(as = SetInterfaceIdChangeImpl.class)
033public interface SetInterfaceIdChange extends Change {
034
035    /**
036     * discriminator value for SetInterfaceIdChange
037     */
038    String SET_INTERFACE_ID_CHANGE = "SetInterfaceIdChange";
039
040    /**
041     *
042     * @return type
043     */
044    @NotNull
045    @JsonProperty("type")
046    public String getType();
047
048    /**
049     *
050     * @return change
051     */
052    @NotNull
053    @JsonProperty("change")
054    public String getChange();
055
056    /**
057     *  <p>Value before the change.</p>
058     * @return previousValue
059     */
060    @NotNull
061    @JsonProperty("previousValue")
062    public String getPreviousValue();
063
064    /**
065     *  <p>Value after the change.</p>
066     * @return nextValue
067     */
068    @NotNull
069    @JsonProperty("nextValue")
070    public String getNextValue();
071
072    /**
073     * set change
074     * @param change value to be set
075     */
076
077    public void setChange(final String change);
078
079    /**
080     *  <p>Value before the change.</p>
081     * @param previousValue value to be set
082     */
083
084    public void setPreviousValue(final String previousValue);
085
086    /**
087     *  <p>Value after the change.</p>
088     * @param nextValue value to be set
089     */
090
091    public void setNextValue(final String nextValue);
092
093    /**
094     * factory method
095     * @return instance of SetInterfaceIdChange
096     */
097    public static SetInterfaceIdChange of() {
098        return new SetInterfaceIdChangeImpl();
099    }
100
101    /**
102     * factory method to create a shallow copy SetInterfaceIdChange
103     * @param template instance to be copied
104     * @return copy instance
105     */
106    public static SetInterfaceIdChange of(final SetInterfaceIdChange template) {
107        SetInterfaceIdChangeImpl instance = new SetInterfaceIdChangeImpl();
108        instance.setChange(template.getChange());
109        instance.setPreviousValue(template.getPreviousValue());
110        instance.setNextValue(template.getNextValue());
111        return instance;
112    }
113
114    /**
115     * factory method to create a deep copy of SetInterfaceIdChange
116     * @param template instance to be copied
117     * @return copy instance
118     */
119    @Nullable
120    public static SetInterfaceIdChange deepCopy(@Nullable final SetInterfaceIdChange template) {
121        if (template == null) {
122            return null;
123        }
124        SetInterfaceIdChangeImpl instance = new SetInterfaceIdChangeImpl();
125        instance.setChange(template.getChange());
126        instance.setPreviousValue(template.getPreviousValue());
127        instance.setNextValue(template.getNextValue());
128        return instance;
129    }
130
131    /**
132     * builder factory method for SetInterfaceIdChange
133     * @return builder
134     */
135    public static SetInterfaceIdChangeBuilder builder() {
136        return SetInterfaceIdChangeBuilder.of();
137    }
138
139    /**
140     * create builder for SetInterfaceIdChange instance
141     * @param template instance with prefilled values for the builder
142     * @return builder
143     */
144    public static SetInterfaceIdChangeBuilder builder(final SetInterfaceIdChange template) {
145        return SetInterfaceIdChangeBuilder.of(template);
146    }
147
148    /**
149     * accessor map function
150     * @param <T> mapped type
151     * @param helper function to map the object
152     * @return mapped value
153     */
154    default <T> T withSetInterfaceIdChange(Function<SetInterfaceIdChange, T> helper) {
155        return helper.apply(this);
156    }
157
158    /**
159     * gives a TypeReference for usage with Jackson DataBind
160     * @return TypeReference
161     */
162    public static com.fasterxml.jackson.core.type.TypeReference<SetInterfaceIdChange> typeReference() {
163        return new com.fasterxml.jackson.core.type.TypeReference<SetInterfaceIdChange>() {
164            @Override
165            public String toString() {
166                return "TypeReference<SetInterfaceIdChange>";
167            }
168        };
169    }
170}