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 * GraphQLFeatureRemovedErrorBuilder 011 * <hr> 012 * Example to create an instance using the builder pattern 013 * <div class=code-example> 014 * <pre><code class='java'> 015 * GraphQLFeatureRemovedError graphQLFeatureRemovedError = GraphQLFeatureRemovedError.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 GraphQLFeatureRemovedErrorBuilder implements Builder<GraphQLFeatureRemovedError> { 022 023 private Map<String, java.lang.Object> values = new HashMap<>(); 024 025 /** 026 * <p>Error-specific additional fields.</p> 027 * @param values properties to be set 028 * @return Builder 029 */ 030 031 public GraphQLFeatureRemovedErrorBuilder values(final Map<String, java.lang.Object> values) { 032 this.values = values; 033 return this; 034 } 035 036 /** 037 * <p>Error-specific additional fields.</p> 038 * @param key property name 039 * @param value property value 040 * @return Builder 041 */ 042 043 public GraphQLFeatureRemovedErrorBuilder addValue(final String key, final java.lang.Object value) { 044 if (this.values == null) { 045 values = new HashMap<>(); 046 } 047 values.put(key, value); 048 return this; 049 } 050 051 /** 052 * <p>Error-specific additional fields.</p> 053 * @return pattern properties 054 */ 055 056 public Map<String, java.lang.Object> getValues() { 057 return this.values; 058 } 059 060 /** 061 * builds GraphQLFeatureRemovedError with checking for non-null required values 062 * @return GraphQLFeatureRemovedError 063 */ 064 public GraphQLFeatureRemovedError build() { 065 return new GraphQLFeatureRemovedErrorImpl(values); 066 } 067 068 /** 069 * builds GraphQLFeatureRemovedError without checking for non-null required values 070 * @return GraphQLFeatureRemovedError 071 */ 072 public GraphQLFeatureRemovedError buildUnchecked() { 073 return new GraphQLFeatureRemovedErrorImpl(values); 074 } 075 076 /** 077 * factory method for an instance of GraphQLFeatureRemovedErrorBuilder 078 * @return builder 079 */ 080 public static GraphQLFeatureRemovedErrorBuilder of() { 081 return new GraphQLFeatureRemovedErrorBuilder(); 082 } 083 084 /** 085 * create builder for GraphQLFeatureRemovedError instance 086 * @param template instance with prefilled values for the builder 087 * @return builder 088 */ 089 public static GraphQLFeatureRemovedErrorBuilder of(final GraphQLFeatureRemovedError template) { 090 GraphQLFeatureRemovedErrorBuilder builder = new GraphQLFeatureRemovedErrorBuilder(); 091 builder.values = template.values(); 092 return builder; 093 } 094 095}