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