001
002package com.commercetools.api.models.product_type;
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 * ProductTypeChangeDescriptionAction
018 *
019 * <hr>
020 * Example to create an instance using the builder pattern
021 * <div class=code-example>
022 * <pre><code class='java'>
023 *     ProductTypeChangeDescriptionAction productTypeChangeDescriptionAction = ProductTypeChangeDescriptionAction.builder()
024 *             .description("{description}")
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 = ProductTypeChangeDescriptionActionImpl.class)
031public interface ProductTypeChangeDescriptionAction extends ProductTypeUpdateAction {
032
033    /**
034     * discriminator value for ProductTypeChangeDescriptionAction
035     */
036    String CHANGE_DESCRIPTION = "changeDescription";
037
038    /**
039     *  <p>New value to set.</p>
040     * @return description
041     */
042    @NotNull
043    @JsonProperty("description")
044    public String getDescription();
045
046    /**
047     *  <p>New value to set.</p>
048     * @param description value to be set
049     */
050
051    public void setDescription(final String description);
052
053    /**
054     * factory method
055     * @return instance of ProductTypeChangeDescriptionAction
056     */
057    public static ProductTypeChangeDescriptionAction of() {
058        return new ProductTypeChangeDescriptionActionImpl();
059    }
060
061    /**
062     * factory method to create a shallow copy ProductTypeChangeDescriptionAction
063     * @param template instance to be copied
064     * @return copy instance
065     */
066    public static ProductTypeChangeDescriptionAction of(final ProductTypeChangeDescriptionAction template) {
067        ProductTypeChangeDescriptionActionImpl instance = new ProductTypeChangeDescriptionActionImpl();
068        instance.setDescription(template.getDescription());
069        return instance;
070    }
071
072    /**
073     * factory method to create a deep copy of ProductTypeChangeDescriptionAction
074     * @param template instance to be copied
075     * @return copy instance
076     */
077    @Nullable
078    public static ProductTypeChangeDescriptionAction deepCopy(
079            @Nullable final ProductTypeChangeDescriptionAction template) {
080        if (template == null) {
081            return null;
082        }
083        ProductTypeChangeDescriptionActionImpl instance = new ProductTypeChangeDescriptionActionImpl();
084        instance.setDescription(template.getDescription());
085        return instance;
086    }
087
088    /**
089     * builder factory method for ProductTypeChangeDescriptionAction
090     * @return builder
091     */
092    public static ProductTypeChangeDescriptionActionBuilder builder() {
093        return ProductTypeChangeDescriptionActionBuilder.of();
094    }
095
096    /**
097     * create builder for ProductTypeChangeDescriptionAction instance
098     * @param template instance with prefilled values for the builder
099     * @return builder
100     */
101    public static ProductTypeChangeDescriptionActionBuilder builder(final ProductTypeChangeDescriptionAction template) {
102        return ProductTypeChangeDescriptionActionBuilder.of(template);
103    }
104
105    /**
106     * accessor map function
107     * @param <T> mapped type
108     * @param helper function to map the object
109     * @return mapped value
110     */
111    default <T> T withProductTypeChangeDescriptionAction(Function<ProductTypeChangeDescriptionAction, T> helper) {
112        return helper.apply(this);
113    }
114
115    /**
116     * gives a TypeReference for usage with Jackson DataBind
117     * @return TypeReference
118     */
119    public static com.fasterxml.jackson.core.type.TypeReference<ProductTypeChangeDescriptionAction> typeReference() {
120        return new com.fasterxml.jackson.core.type.TypeReference<ProductTypeChangeDescriptionAction>() {
121            @Override
122            public String toString() {
123                return "TypeReference<ProductTypeChangeDescriptionAction>";
124            }
125        };
126    }
127}