001
002package com.commercetools.importapi.models.producttypes;
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 * AttributeMoneyType
017 *
018 * <hr>
019 * Example to create an instance using the builder pattern
020 * <div class=code-example>
021 * <pre><code class='java'>
022 *     AttributeMoneyType attributeMoneyType = AttributeMoneyType.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 = AttributeMoneyTypeImpl.class)
029public interface AttributeMoneyType extends AttributeType {
030
031    /**
032     * discriminator value for AttributeMoneyType
033     */
034    String MONEY = "money";
035
036    /**
037     * factory method
038     * @return instance of AttributeMoneyType
039     */
040    public static AttributeMoneyType of() {
041        return new AttributeMoneyTypeImpl();
042    }
043
044    /**
045     * factory method to create a shallow copy AttributeMoneyType
046     * @param template instance to be copied
047     * @return copy instance
048     */
049    public static AttributeMoneyType of(final AttributeMoneyType template) {
050        AttributeMoneyTypeImpl instance = new AttributeMoneyTypeImpl();
051        return instance;
052    }
053
054    /**
055     * factory method to create a deep copy of AttributeMoneyType
056     * @param template instance to be copied
057     * @return copy instance
058     */
059    @Nullable
060    public static AttributeMoneyType deepCopy(@Nullable final AttributeMoneyType template) {
061        if (template == null) {
062            return null;
063        }
064        AttributeMoneyTypeImpl instance = new AttributeMoneyTypeImpl();
065        return instance;
066    }
067
068    /**
069     * builder factory method for AttributeMoneyType
070     * @return builder
071     */
072    public static AttributeMoneyTypeBuilder builder() {
073        return AttributeMoneyTypeBuilder.of();
074    }
075
076    /**
077     * create builder for AttributeMoneyType instance
078     * @param template instance with prefilled values for the builder
079     * @return builder
080     */
081    public static AttributeMoneyTypeBuilder builder(final AttributeMoneyType template) {
082        return AttributeMoneyTypeBuilder.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 withAttributeMoneyType(Function<AttributeMoneyType, 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<AttributeMoneyType> typeReference() {
100        return new com.fasterxml.jackson.core.type.TypeReference<AttributeMoneyType>() {
101            @Override
102            public String toString() {
103                return "TypeReference<AttributeMoneyType>";
104            }
105        };
106    }
107}