001
002package com.commercetools.api.models.error;
003
004import java.util.*;
005
006import io.vrap.rmf.base.client.Builder;
007import io.vrap.rmf.base.client.utils.Generated;
008
009/**
010 * GraphQLNoMatchingProductDiscountFoundErrorBuilder
011 * <hr>
012 * Example to create an instance using the builder pattern
013 * <div class=code-example>
014 * <pre><code class='java'>
015 *     GraphQLNoMatchingProductDiscountFoundError graphQLNoMatchingProductDiscountFoundError = GraphQLNoMatchingProductDiscountFoundError.builder()
016 *             .build()
017 * </code></pre>
018 * </div>
019 */
020@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
021public class GraphQLNoMatchingProductDiscountFoundErrorBuilder
022        implements Builder<GraphQLNoMatchingProductDiscountFoundError> {
023
024    private Map<String, java.lang.Object> values = new HashMap<>();
025
026    /**
027     *  <p>Error-specific additional fields.</p>
028     * @param values properties to be set
029     * @return Builder
030     */
031
032    public GraphQLNoMatchingProductDiscountFoundErrorBuilder values(final Map<String, java.lang.Object> values) {
033        this.values = values;
034        return this;
035    }
036
037    /**
038     *  <p>Error-specific additional fields.</p>
039     * @param key property name
040     * @param value property value
041     * @return Builder
042     */
043
044    public GraphQLNoMatchingProductDiscountFoundErrorBuilder addValue(final String key, final java.lang.Object value) {
045        if (this.values == null) {
046            values = new HashMap<>();
047        }
048        values.put(key, value);
049        return this;
050    }
051
052    /**
053     *  <p>Error-specific additional fields.</p>
054     * @return pattern properties
055     */
056
057    public Map<String, java.lang.Object> getValues() {
058        return this.values;
059    }
060
061    /**
062     * builds GraphQLNoMatchingProductDiscountFoundError with checking for non-null required values
063     * @return GraphQLNoMatchingProductDiscountFoundError
064     */
065    public GraphQLNoMatchingProductDiscountFoundError build() {
066        return new GraphQLNoMatchingProductDiscountFoundErrorImpl(values);
067    }
068
069    /**
070     * builds GraphQLNoMatchingProductDiscountFoundError without checking for non-null required values
071     * @return GraphQLNoMatchingProductDiscountFoundError
072     */
073    public GraphQLNoMatchingProductDiscountFoundError buildUnchecked() {
074        return new GraphQLNoMatchingProductDiscountFoundErrorImpl(values);
075    }
076
077    /**
078     * factory method for an instance of GraphQLNoMatchingProductDiscountFoundErrorBuilder
079     * @return builder
080     */
081    public static GraphQLNoMatchingProductDiscountFoundErrorBuilder of() {
082        return new GraphQLNoMatchingProductDiscountFoundErrorBuilder();
083    }
084
085    /**
086     * create builder for GraphQLNoMatchingProductDiscountFoundError instance
087     * @param template instance with prefilled values for the builder
088     * @return builder
089     */
090    public static GraphQLNoMatchingProductDiscountFoundErrorBuilder of(
091            final GraphQLNoMatchingProductDiscountFoundError template) {
092        GraphQLNoMatchingProductDiscountFoundErrorBuilder builder = new GraphQLNoMatchingProductDiscountFoundErrorBuilder();
093        builder.values = template.values();
094        return builder;
095    }
096
097}