001
002package com.commercetools.api.models.payment;
003
004import java.time.*;
005import java.util.*;
006import java.util.function.Function;
007
008import javax.annotation.Nullable;
009
010import com.fasterxml.jackson.annotation.*;
011import com.fasterxml.jackson.databind.annotation.*;
012
013import io.vrap.rmf.base.client.utils.Generated;
014
015/**
016 *  <p>Produces the PaymentStatusInterfaceCodeSet Message.</p>
017 *
018 * <hr>
019 * Example to create an instance using the builder pattern
020 * <div class=code-example>
021 * <pre><code class='java'>
022 *     PaymentSetStatusInterfaceCodeAction paymentSetStatusInterfaceCodeAction = PaymentSetStatusInterfaceCodeAction.builder()
023 *             .build()
024 * </code></pre>
025 * </div>
026 */
027@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
028@JsonDeserialize(as = PaymentSetStatusInterfaceCodeActionImpl.class)
029public interface PaymentSetStatusInterfaceCodeAction extends PaymentUpdateAction {
030
031    /**
032     * discriminator value for PaymentSetStatusInterfaceCodeAction
033     */
034    String SET_STATUS_INTERFACE_CODE = "setStatusInterfaceCode";
035
036    /**
037     *  <p>Value to set. If empty, any existing value will be removed.</p>
038     * @return interfaceCode
039     */
040
041    @JsonProperty("interfaceCode")
042    public String getInterfaceCode();
043
044    /**
045     *  <p>Value to set. If empty, any existing value will be removed.</p>
046     * @param interfaceCode value to be set
047     */
048
049    public void setInterfaceCode(final String interfaceCode);
050
051    /**
052     * factory method
053     * @return instance of PaymentSetStatusInterfaceCodeAction
054     */
055    public static PaymentSetStatusInterfaceCodeAction of() {
056        return new PaymentSetStatusInterfaceCodeActionImpl();
057    }
058
059    /**
060     * factory method to create a shallow copy PaymentSetStatusInterfaceCodeAction
061     * @param template instance to be copied
062     * @return copy instance
063     */
064    public static PaymentSetStatusInterfaceCodeAction of(final PaymentSetStatusInterfaceCodeAction template) {
065        PaymentSetStatusInterfaceCodeActionImpl instance = new PaymentSetStatusInterfaceCodeActionImpl();
066        instance.setInterfaceCode(template.getInterfaceCode());
067        return instance;
068    }
069
070    /**
071     * factory method to create a deep copy of PaymentSetStatusInterfaceCodeAction
072     * @param template instance to be copied
073     * @return copy instance
074     */
075    @Nullable
076    public static PaymentSetStatusInterfaceCodeAction deepCopy(
077            @Nullable final PaymentSetStatusInterfaceCodeAction template) {
078        if (template == null) {
079            return null;
080        }
081        PaymentSetStatusInterfaceCodeActionImpl instance = new PaymentSetStatusInterfaceCodeActionImpl();
082        instance.setInterfaceCode(template.getInterfaceCode());
083        return instance;
084    }
085
086    /**
087     * builder factory method for PaymentSetStatusInterfaceCodeAction
088     * @return builder
089     */
090    public static PaymentSetStatusInterfaceCodeActionBuilder builder() {
091        return PaymentSetStatusInterfaceCodeActionBuilder.of();
092    }
093
094    /**
095     * create builder for PaymentSetStatusInterfaceCodeAction instance
096     * @param template instance with prefilled values for the builder
097     * @return builder
098     */
099    public static PaymentSetStatusInterfaceCodeActionBuilder builder(
100            final PaymentSetStatusInterfaceCodeAction template) {
101        return PaymentSetStatusInterfaceCodeActionBuilder.of(template);
102    }
103
104    /**
105     * accessor map function
106     * @param <T> mapped type
107     * @param helper function to map the object
108     * @return mapped value
109     */
110    default <T> T withPaymentSetStatusInterfaceCodeAction(Function<PaymentSetStatusInterfaceCodeAction, T> helper) {
111        return helper.apply(this);
112    }
113
114    /**
115     * gives a TypeReference for usage with Jackson DataBind
116     * @return TypeReference
117     */
118    public static com.fasterxml.jackson.core.type.TypeReference<PaymentSetStatusInterfaceCodeAction> typeReference() {
119        return new com.fasterxml.jackson.core.type.TypeReference<PaymentSetStatusInterfaceCodeAction>() {
120            @Override
121            public String toString() {
122                return "TypeReference<PaymentSetStatusInterfaceCodeAction>";
123            }
124        };
125    }
126}