commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SearchFuzzyValueBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class SearchFuzzyValueBuilder implements Builder
22{
27 private $field;
28
33 private $boost;
34
39 private $fieldType;
40
45 private $value;
46
51 private $level;
52
57 private $language;
58
63 private $mustMatch;
64
69 public function getField()
70 {
71 return $this->field;
72 }
73
78 public function getBoost()
79 {
80 return $this->boost;
81 }
82
89 public function getFieldType()
90 {
91 return $this->fieldType;
92 }
93
100 public function getValue()
101 {
102 return $this->value;
103 }
104
116 public function getLevel()
117 {
118 return $this->level;
119 }
120
127 public function getLanguage()
128 {
129 return $this->language;
130 }
131
138 public function getMustMatch()
139 {
140 return $this->mustMatch;
141 }
142
147 public function withField(?string $field)
148 {
149 $this->field = $field;
150
151 return $this;
152 }
153
158 public function withBoost(?float $boost)
159 {
160 $this->boost = $boost;
161
162 return $this;
163 }
164
169 public function withFieldType(?string $fieldType)
170 {
171 $this->fieldType = $fieldType;
172
173 return $this;
174 }
175
180 public function withValue($value)
181 {
182 $this->value = $value;
183
184 return $this;
185 }
186
191 public function withLevel(?int $level)
192 {
193 $this->level = $level;
194
195 return $this;
196 }
197
202 public function withLanguage(?string $language)
203 {
204 $this->language = $language;
205
206 return $this;
207 }
208
213 public function withMustMatch(?string $mustMatch)
214 {
215 $this->mustMatch = $mustMatch;
216
217 return $this;
218 }
219
220
221 public function build(): SearchFuzzyValue
222 {
223 return new SearchFuzzyValueModel(
224 $this->field,
225 $this->boost,
226 $this->fieldType,
227 $this->value,
228 $this->level,
229 $this->language,
230 $this->mustMatch
231 );
232 }
233
234 public static function of(): SearchFuzzyValueBuilder
235 {
236 return new self();
237 }
238}