com.commercetools.history.models.common.SearchKeywordsBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commercetools-sdk-java-history Show documentation
Show all versions of commercetools-sdk-java-history Show documentation
The e-commerce SDK from commercetools Composable Commerce for Java
package com.commercetools.history.models.common;
import java.util.*;
import io.vrap.rmf.base.client.Builder;
import io.vrap.rmf.base.client.utils.Generated;
/**
* SearchKeywordsBuilder
*
* Example to create an instance using the builder pattern
*
*
* SearchKeywords searchKeywords = SearchKeywords.builder()
* .plus/^[a-z]{2}(-[A-Z]{2})?$/(/^[a-z]{2}(-[A-Z]{2})?$/Builder -> /^[a-z]{2}(-[A-Z]{2})?$/Builder)
* .build()
*
*
*/
@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen")
public class SearchKeywordsBuilder implements Builder {
private Map> values = new HashMap<>();
/**
* assign pattern properties to the builder
* @param values properties to be set
* @return Builder
*/
public SearchKeywordsBuilder values(
final Map> values) {
this.values = values;
return this;
}
/**
* assign a pattern property to the builder
* @param key property name
* @param value property value
* @return Builder
*/
public SearchKeywordsBuilder addValue(final String key,
final java.util.List value) {
if (this.values == null) {
values = new HashMap<>();
}
values.put(key, value);
return this;
}
/**
* values of pattern properties
* @return pattern properties
*/
public Map> getValues() {
return this.values;
}
/**
* builds SearchKeywords with checking for non-null required values
* @return SearchKeywords
*/
public SearchKeywords build() {
return new SearchKeywordsImpl(values);
}
/**
* builds SearchKeywords without checking for non-null required values
* @return SearchKeywords
*/
public SearchKeywords buildUnchecked() {
return new SearchKeywordsImpl(values);
}
/**
* factory method for an instance of SearchKeywordsBuilder
* @return builder
*/
public static SearchKeywordsBuilder of() {
return new SearchKeywordsBuilder();
}
/**
* create builder for SearchKeywords instance
* @param template instance with prefilled values for the builder
* @return builder
*/
public static SearchKeywordsBuilder of(final SearchKeywords template) {
SearchKeywordsBuilder builder = new SearchKeywordsBuilder();
builder.values = template.values();
return builder;
}
}