|
| 1 | + |
| 2 | +package com.commercetools.api.models.search; |
| 3 | + |
| 4 | +import java.time.*; |
| 5 | +import java.util.*; |
| 6 | +import java.util.function.Function; |
| 7 | + |
| 8 | +import javax.annotation.Nullable; |
| 9 | + |
| 10 | +import com.fasterxml.jackson.annotation.*; |
| 11 | +import com.fasterxml.jackson.databind.annotation.*; |
| 12 | + |
| 13 | +import io.vrap.rmf.base.client.utils.Generated; |
| 14 | + |
| 15 | +/** |
| 16 | + * SearchExactValue |
| 17 | + * |
| 18 | + * <hr> |
| 19 | + * Example to create an instance using the builder pattern |
| 20 | + * <div class=code-example> |
| 21 | + * <pre><code class='java'> |
| 22 | + * SearchExactValue searchExactValue = SearchExactValue.builder() |
| 23 | + * .field("{field}") |
| 24 | + * .build() |
| 25 | + * </code></pre> |
| 26 | + * </div> |
| 27 | + */ |
| 28 | +@Generated(value = "io.vrap.rmf.codegen.rendering.CoreCodeGenerator", comments = "https://github.com/commercetools/rmf-codegen") |
| 29 | +@JsonDeserialize(as = SearchExactValueImpl.class) |
| 30 | +public interface SearchExactValue extends SearchQueryExpressionValue { |
| 31 | + |
| 32 | + /** |
| 33 | + * |
| 34 | + * @return value |
| 35 | + */ |
| 36 | + |
| 37 | + @JsonProperty("value") |
| 38 | + public Object getValue(); |
| 39 | + |
| 40 | + /** |
| 41 | + * |
| 42 | + * @return values |
| 43 | + */ |
| 44 | + |
| 45 | + @JsonProperty("values") |
| 46 | + public List<Object> getValues(); |
| 47 | + |
| 48 | + /** |
| 49 | + * <p>String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: <code>en</code>, <code>en-US</code>, <code>zh-Hans-SG</code>.</p> |
| 50 | + * @return language |
| 51 | + */ |
| 52 | + |
| 53 | + @JsonProperty("language") |
| 54 | + public String getLanguage(); |
| 55 | + |
| 56 | + /** |
| 57 | + * |
| 58 | + * @return caseInsensitive |
| 59 | + */ |
| 60 | + |
| 61 | + @JsonProperty("caseInsensitive") |
| 62 | + public Boolean getCaseInsensitive(); |
| 63 | + |
| 64 | + /** |
| 65 | + * set value |
| 66 | + * @param value value to be set |
| 67 | + */ |
| 68 | + |
| 69 | + public void setValue(final Object value); |
| 70 | + |
| 71 | + /** |
| 72 | + * set values |
| 73 | + * @param values values to be set |
| 74 | + */ |
| 75 | + |
| 76 | + @JsonIgnore |
| 77 | + public void setValues(final Object... values); |
| 78 | + |
| 79 | + /** |
| 80 | + * set values |
| 81 | + * @param values values to be set |
| 82 | + */ |
| 83 | + |
| 84 | + public void setValues(final List<Object> values); |
| 85 | + |
| 86 | + /** |
| 87 | + * <p>String value specifying linguistic and regional preferences using the IETF language tag format, as described in BCP 47. The format combines language, script, and region using hyphen-separated subtags. For example: <code>en</code>, <code>en-US</code>, <code>zh-Hans-SG</code>.</p> |
| 88 | + * @param language value to be set |
| 89 | + */ |
| 90 | + |
| 91 | + public void setLanguage(final String language); |
| 92 | + |
| 93 | + /** |
| 94 | + * set caseInsensitive |
| 95 | + * @param caseInsensitive value to be set |
| 96 | + */ |
| 97 | + |
| 98 | + public void setCaseInsensitive(final Boolean caseInsensitive); |
| 99 | + |
| 100 | + /** |
| 101 | + * factory method |
| 102 | + * @return instance of SearchExactValue |
| 103 | + */ |
| 104 | + public static SearchExactValue of() { |
| 105 | + return new SearchExactValueImpl(); |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * factory method to create a shallow copy SearchExactValue |
| 110 | + * @param template instance to be copied |
| 111 | + * @return copy instance |
| 112 | + */ |
| 113 | + public static SearchExactValue of(final SearchExactValue template) { |
| 114 | + SearchExactValueImpl instance = new SearchExactValueImpl(); |
| 115 | + instance.setField(template.getField()); |
| 116 | + instance.setBoost(template.getBoost()); |
| 117 | + instance.setFieldType(template.getFieldType()); |
| 118 | + instance.setValue(template.getValue()); |
| 119 | + instance.setValues(template.getValues()); |
| 120 | + instance.setLanguage(template.getLanguage()); |
| 121 | + instance.setCaseInsensitive(template.getCaseInsensitive()); |
| 122 | + return instance; |
| 123 | + } |
| 124 | + |
| 125 | + /** |
| 126 | + * factory method to create a deep copy of SearchExactValue |
| 127 | + * @param template instance to be copied |
| 128 | + * @return copy instance |
| 129 | + */ |
| 130 | + @Nullable |
| 131 | + public static SearchExactValue deepCopy(@Nullable final SearchExactValue template) { |
| 132 | + if (template == null) { |
| 133 | + return null; |
| 134 | + } |
| 135 | + SearchExactValueImpl instance = new SearchExactValueImpl(); |
| 136 | + instance.setField(template.getField()); |
| 137 | + instance.setBoost(template.getBoost()); |
| 138 | + instance.setFieldType(template.getFieldType()); |
| 139 | + instance.setValue(template.getValue()); |
| 140 | + instance.setValues(Optional.ofNullable(template.getValues()).map(ArrayList::new).orElse(null)); |
| 141 | + instance.setLanguage(template.getLanguage()); |
| 142 | + instance.setCaseInsensitive(template.getCaseInsensitive()); |
| 143 | + return instance; |
| 144 | + } |
| 145 | + |
| 146 | + /** |
| 147 | + * builder factory method for SearchExactValue |
| 148 | + * @return builder |
| 149 | + */ |
| 150 | + public static SearchExactValueBuilder builder() { |
| 151 | + return SearchExactValueBuilder.of(); |
| 152 | + } |
| 153 | + |
| 154 | + /** |
| 155 | + * create builder for SearchExactValue instance |
| 156 | + * @param template instance with prefilled values for the builder |
| 157 | + * @return builder |
| 158 | + */ |
| 159 | + public static SearchExactValueBuilder builder(final SearchExactValue template) { |
| 160 | + return SearchExactValueBuilder.of(template); |
| 161 | + } |
| 162 | + |
| 163 | + /** |
| 164 | + * accessor map function |
| 165 | + * @param <T> mapped type |
| 166 | + * @param helper function to map the object |
| 167 | + * @return mapped value |
| 168 | + */ |
| 169 | + default <T> T withSearchExactValue(Function<SearchExactValue, T> helper) { |
| 170 | + return helper.apply(this); |
| 171 | + } |
| 172 | + |
| 173 | + /** |
| 174 | + * gives a TypeReference for usage with Jackson DataBind |
| 175 | + * @return TypeReference |
| 176 | + */ |
| 177 | + public static com.fasterxml.jackson.core.type.TypeReference<SearchExactValue> typeReference() { |
| 178 | + return new com.fasterxml.jackson.core.type.TypeReference<SearchExactValue>() { |
| 179 | + @Override |
| 180 | + public String toString() { |
| 181 | + return "TypeReference<SearchExactValue>"; |
| 182 | + } |
| 183 | + }; |
| 184 | + } |
| 185 | +} |
0 commit comments