commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SearchExactValueBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class SearchExactValueBuilder implements Builder
22{
27 private $field;
28
33 private $boost;
34
39 private $fieldType;
40
45 private $value;
46
51 private $values;
52
57 private $language;
58
63 private $caseInsensitive;
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
98 public function getValue()
99 {
100 return $this->value;
101 }
102
107 public function getValues()
108 {
109 return $this->values;
110 }
111
118 public function getLanguage()
119 {
120 return $this->language;
121 }
122
127 public function getCaseInsensitive()
128 {
129 return $this->caseInsensitive;
130 }
131
136 public function withField(?string $field)
137 {
138 $this->field = $field;
139
140 return $this;
141 }
142
147 public function withBoost(?float $boost)
148 {
149 $this->boost = $boost;
150
151 return $this;
152 }
153
158 public function withFieldType(?string $fieldType)
159 {
160 $this->fieldType = $fieldType;
161
162 return $this;
163 }
164
169 public function withValue($value)
170 {
171 $this->value = $value;
172
173 return $this;
174 }
175
180 public function withValues(?array $values)
181 {
182 $this->values = $values;
183
184 return $this;
185 }
186
191 public function withLanguage(?string $language)
192 {
193 $this->language = $language;
194
195 return $this;
196 }
197
202 public function withCaseInsensitive(?bool $caseInsensitive)
203 {
204 $this->caseInsensitive = $caseInsensitive;
205
206 return $this;
207 }
208
209
210 public function build(): SearchExactValue
211 {
212 return new SearchExactValueModel(
213 $this->field,
214 $this->boost,
215 $this->fieldType,
216 $this->value,
217 $this->values,
218 $this->language,
219 $this->caseInsensitive
220 );
221 }
222
223 public static function of(): SearchExactValueBuilder
224 {
225 return new self();
226 }
227}