001
002package com.commercetools.importapi.models.types;
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>Field type for CentPrecisionMoney values.</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 *     CustomFieldMoneyType customFieldMoneyType = CustomFieldMoneyType.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 = CustomFieldMoneyTypeImpl.class)
029public interface CustomFieldMoneyType extends FieldType {
030
031    /**
032     * discriminator value for CustomFieldMoneyType
033     */
034    String MONEY = "Money";
035
036    /**
037     * factory method
038     * @return instance of CustomFieldMoneyType
039     */
040    public static CustomFieldMoneyType of() {
041        return new CustomFieldMoneyTypeImpl();
042    }
043
044    /**
045     * factory method to create a shallow copy CustomFieldMoneyType
046     * @param template instance to be copied
047     * @return copy instance
048     */
049    public static CustomFieldMoneyType of(final CustomFieldMoneyType template) {
050        CustomFieldMoneyTypeImpl instance = new CustomFieldMoneyTypeImpl();
051        return instance;
052    }
053
054    /**
055     * factory method to create a deep copy of CustomFieldMoneyType
056     * @param template instance to be copied
057     * @return copy instance
058     */
059    @Nullable
060    public static CustomFieldMoneyType deepCopy(@Nullable final CustomFieldMoneyType template) {
061        if (template == null) {
062            return null;
063        }
064        CustomFieldMoneyTypeImpl instance = new CustomFieldMoneyTypeImpl();
065        return instance;
066    }
067
068    /**
069     * builder factory method for CustomFieldMoneyType
070     * @return builder
071     */
072    public static CustomFieldMoneyTypeBuilder builder() {
073        return CustomFieldMoneyTypeBuilder.of();
074    }
075
076    /**
077     * create builder for CustomFieldMoneyType instance
078     * @param template instance with prefilled values for the builder
079     * @return builder
080     */
081    public static CustomFieldMoneyTypeBuilder builder(final CustomFieldMoneyType template) {
082        return CustomFieldMoneyTypeBuilder.of(template);
083    }
084
085    /**
086     * accessor map function
087     * @param <T> mapped type
088     * @param helper function to map the object
089     * @return mapped value
090     */
091    default <T> T withCustomFieldMoneyType(Function<CustomFieldMoneyType, T> helper) {
092        return helper.apply(this);
093    }
094
095    /**
096     * gives a TypeReference for usage with Jackson DataBind
097     * @return TypeReference
098     */
099    public static com.fasterxml.jackson.core.type.TypeReference<CustomFieldMoneyType> typeReference() {
100        return new com.fasterxml.jackson.core.type.TypeReference<CustomFieldMoneyType>() {
101            @Override
102            public String toString() {
103                return "TypeReference<CustomFieldMoneyType>";
104            }
105        };
106    }
107}