001
002package com.commercetools.ml.models.similar_products;
003
004import java.util.*;
005
006import javax.annotation.Nullable;
007
008import io.vrap.rmf.base.client.Builder;
009import io.vrap.rmf.base.client.utils.Generated;
010
011/**
012 * SimilarityMeasuresBuilder
013 * <hr>
014 * Example to create an instance using the builder pattern
015 * <div class=code-example>
016 * <pre><code class='java'>
017 *     SimilarityMeasures similarityMeasures = SimilarityMeasures.builder()
018 *             .build()
019 * </code></pre>
020 * </div>
021 */
022@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
023public class SimilarityMeasuresBuilder implements Builder<SimilarityMeasures> {
024
025    @Nullable
026    private Long name;
027
028    @Nullable
029    private Long description;
030
031    @Nullable
032    private Long attribute;
033
034    @Nullable
035    private Long variantCount;
036
037    @Nullable
038    private Long price;
039
040    /**
041     *  <p>Importance of the <code>name</code> attribute in overall similarity.</p>
042     * @param name value to be set
043     * @return Builder
044     */
045
046    public SimilarityMeasuresBuilder name(@Nullable final Long name) {
047        this.name = name;
048        return this;
049    }
050
051    /**
052     *  <p>Importance of the <code>description</code> attribute in overall similarity.</p>
053     * @param description value to be set
054     * @return Builder
055     */
056
057    public SimilarityMeasuresBuilder description(@Nullable final Long description) {
058        this.description = description;
059        return this;
060    }
061
062    /**
063     *  <p>Importance of the <code>description</code> attribute in overall similarity.</p>
064     * @param attribute value to be set
065     * @return Builder
066     */
067
068    public SimilarityMeasuresBuilder attribute(@Nullable final Long attribute) {
069        this.attribute = attribute;
070        return this;
071    }
072
073    /**
074     *  <p>Importance of the number of product variants in overall similarity.</p>
075     * @param variantCount value to be set
076     * @return Builder
077     */
078
079    public SimilarityMeasuresBuilder variantCount(@Nullable final Long variantCount) {
080        this.variantCount = variantCount;
081        return this;
082    }
083
084    /**
085     *  <p>Importance of the <code>price</code> attribute in overall similarity.</p>
086     * @param price value to be set
087     * @return Builder
088     */
089
090    public SimilarityMeasuresBuilder price(@Nullable final Long price) {
091        this.price = price;
092        return this;
093    }
094
095    /**
096     *  <p>Importance of the <code>name</code> attribute in overall similarity.</p>
097     * @return name
098     */
099
100    @Nullable
101    public Long getName() {
102        return this.name;
103    }
104
105    /**
106     *  <p>Importance of the <code>description</code> attribute in overall similarity.</p>
107     * @return description
108     */
109
110    @Nullable
111    public Long getDescription() {
112        return this.description;
113    }
114
115    /**
116     *  <p>Importance of the <code>description</code> attribute in overall similarity.</p>
117     * @return attribute
118     */
119
120    @Nullable
121    public Long getAttribute() {
122        return this.attribute;
123    }
124
125    /**
126     *  <p>Importance of the number of product variants in overall similarity.</p>
127     * @return variantCount
128     */
129
130    @Nullable
131    public Long getVariantCount() {
132        return this.variantCount;
133    }
134
135    /**
136     *  <p>Importance of the <code>price</code> attribute in overall similarity.</p>
137     * @return price
138     */
139
140    @Nullable
141    public Long getPrice() {
142        return this.price;
143    }
144
145    /**
146     * builds SimilarityMeasures with checking for non-null required values
147     * @return SimilarityMeasures
148     */
149    public SimilarityMeasures build() {
150        return new SimilarityMeasuresImpl(name, description, attribute, variantCount, price);
151    }
152
153    /**
154     * builds SimilarityMeasures without checking for non-null required values
155     * @return SimilarityMeasures
156     */
157    public SimilarityMeasures buildUnchecked() {
158        return new SimilarityMeasuresImpl(name, description, attribute, variantCount, price);
159    }
160
161    /**
162     * factory method for an instance of SimilarityMeasuresBuilder
163     * @return builder
164     */
165    public static SimilarityMeasuresBuilder of() {
166        return new SimilarityMeasuresBuilder();
167    }
168
169    /**
170     * create builder for SimilarityMeasures instance
171     * @param template instance with prefilled values for the builder
172     * @return builder
173     */
174    public static SimilarityMeasuresBuilder of(final SimilarityMeasures template) {
175        SimilarityMeasuresBuilder builder = new SimilarityMeasuresBuilder();
176        builder.name = template.getName();
177        builder.description = template.getDescription();
178        builder.attribute = template.getAttribute();
179        builder.variantCount = template.getVariantCount();
180        builder.price = template.getPrice();
181        return builder;
182    }
183
184}