001
002package com.commercetools.api.models.me;
003
004import java.time.*;
005import java.util.*;
006import java.util.function.Function;
007
008import javax.annotation.Nullable;
009import javax.validation.Valid;
010
011import com.commercetools.api.models.common.LocalizedString;
012import com.fasterxml.jackson.annotation.*;
013import com.fasterxml.jackson.databind.annotation.*;
014
015import io.vrap.rmf.base.client.utils.Generated;
016
017/**
018 * MyPaymentSetMethodInfoNameAction
019 *
020 * <hr>
021 * Example to create an instance using the builder pattern
022 * <div class=code-example>
023 * <pre><code class='java'>
024 *     MyPaymentSetMethodInfoNameAction myPaymentSetMethodInfoNameAction = MyPaymentSetMethodInfoNameAction.builder()
025 *             .build()
026 * </code></pre>
027 * </div>
028 */
029@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
030@JsonDeserialize(as = MyPaymentSetMethodInfoNameActionImpl.class)
031public interface MyPaymentSetMethodInfoNameAction extends MyPaymentUpdateAction {
032
033    /**
034     * discriminator value for MyPaymentSetMethodInfoNameAction
035     */
036    String SET_METHOD_INFO_NAME = "setMethodInfoName";
037
038    /**
039     *  <p>Value to set. If empty, any existing value will be removed.</p>
040     * @return name
041     */
042    @Valid
043    @JsonProperty("name")
044    public LocalizedString getName();
045
046    /**
047     *  <p>Value to set. If empty, any existing value will be removed.</p>
048     * @param name value to be set
049     */
050
051    public void setName(final LocalizedString name);
052
053    /**
054     * factory method
055     * @return instance of MyPaymentSetMethodInfoNameAction
056     */
057    public static MyPaymentSetMethodInfoNameAction of() {
058        return new MyPaymentSetMethodInfoNameActionImpl();
059    }
060
061    /**
062     * factory method to create a shallow copy MyPaymentSetMethodInfoNameAction
063     * @param template instance to be copied
064     * @return copy instance
065     */
066    public static MyPaymentSetMethodInfoNameAction of(final MyPaymentSetMethodInfoNameAction template) {
067        MyPaymentSetMethodInfoNameActionImpl instance = new MyPaymentSetMethodInfoNameActionImpl();
068        instance.setName(template.getName());
069        return instance;
070    }
071
072    /**
073     * factory method to create a deep copy of MyPaymentSetMethodInfoNameAction
074     * @param template instance to be copied
075     * @return copy instance
076     */
077    @Nullable
078    public static MyPaymentSetMethodInfoNameAction deepCopy(@Nullable final MyPaymentSetMethodInfoNameAction template) {
079        if (template == null) {
080            return null;
081        }
082        MyPaymentSetMethodInfoNameActionImpl instance = new MyPaymentSetMethodInfoNameActionImpl();
083        instance.setName(com.commercetools.api.models.common.LocalizedString.deepCopy(template.getName()));
084        return instance;
085    }
086
087    /**
088     * builder factory method for MyPaymentSetMethodInfoNameAction
089     * @return builder
090     */
091    public static MyPaymentSetMethodInfoNameActionBuilder builder() {
092        return MyPaymentSetMethodInfoNameActionBuilder.of();
093    }
094
095    /**
096     * create builder for MyPaymentSetMethodInfoNameAction instance
097     * @param template instance with prefilled values for the builder
098     * @return builder
099     */
100    public static MyPaymentSetMethodInfoNameActionBuilder builder(final MyPaymentSetMethodInfoNameAction template) {
101        return MyPaymentSetMethodInfoNameActionBuilder.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 withMyPaymentSetMethodInfoNameAction(Function<MyPaymentSetMethodInfoNameAction, 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<MyPaymentSetMethodInfoNameAction> typeReference() {
119        return new com.fasterxml.jackson.core.type.TypeReference<MyPaymentSetMethodInfoNameAction>() {
120            @Override
121            public String toString() {
122                return "TypeReference<MyPaymentSetMethodInfoNameAction>";
123            }
124        };
125    }
126}