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