commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SearchFuzzyValueModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $field;
27
32 protected $boost;
33
38 protected $fieldType;
39
44 protected $value;
45
50 protected $level;
51
56 protected $language;
57
62 protected $mustMatch;
63
64
68 public function __construct(
69 ?string $field = null,
70 ?float $boost = null,
71 ?string $fieldType = null,
72 $value = null,
73 ?int $level = null,
74 ?string $language = null,
75 ?string $mustMatch = null
76 ) {
77 $this->field = $field;
78 $this->boost = $boost;
79 $this->fieldType = $fieldType;
80 $this->value = $value;
81 $this->level = $level;
82 $this->language = $language;
83 $this->mustMatch = $mustMatch;
84 }
85
90 public function getField()
91 {
92 if (is_null($this->field)) {
94 $data = $this->raw(self::FIELD_FIELD);
95 if (is_null($data)) {
96 return null;
97 }
98 $this->field = (string) $data;
99 }
100
101 return $this->field;
102 }
103
108 public function getBoost()
109 {
110 if (is_null($this->boost)) {
112 $data = $this->raw(self::FIELD_BOOST);
113 if (is_null($data)) {
114 return null;
115 }
116 $this->boost = (float) $data;
117 }
118
119 return $this->boost;
120 }
121
128 public function getFieldType()
129 {
130 if (is_null($this->fieldType)) {
132 $data = $this->raw(self::FIELD_FIELD_TYPE);
133 if (is_null($data)) {
134 return null;
135 }
136 $this->fieldType = (string) $data;
137 }
138
139 return $this->fieldType;
140 }
141
148 public function getValue()
149 {
150 if (is_null($this->value)) {
152 $data = $this->raw(self::FIELD_VALUE);
153 if (is_null($data)) {
154 return null;
155 }
156 $this->value = $data;
157 }
158
159 return $this->value;
160 }
161
173 public function getLevel()
174 {
175 if (is_null($this->level)) {
177 $data = $this->raw(self::FIELD_LEVEL);
178 if (is_null($data)) {
179 return null;
180 }
181 $this->level = (int) $data;
182 }
183
184 return $this->level;
185 }
186
193 public function getLanguage()
194 {
195 if (is_null($this->language)) {
197 $data = $this->raw(self::FIELD_LANGUAGE);
198 if (is_null($data)) {
199 return null;
200 }
201 $this->language = (string) $data;
202 }
203
204 return $this->language;
205 }
206
213 public function getMustMatch()
214 {
215 if (is_null($this->mustMatch)) {
217 $data = $this->raw(self::FIELD_MUST_MATCH);
218 if (is_null($data)) {
219 return null;
220 }
221 $this->mustMatch = (string) $data;
222 }
223
224 return $this->mustMatch;
225 }
226
227
231 public function setField(?string $field): void
232 {
233 $this->field = $field;
234 }
235
239 public function setBoost(?float $boost): void
240 {
241 $this->boost = $boost;
242 }
243
247 public function setFieldType(?string $fieldType): void
248 {
249 $this->fieldType = $fieldType;
250 }
251
255 public function setValue($value): void
256 {
257 $this->value = $value;
258 }
259
263 public function setLevel(?int $level): void
264 {
265 $this->level = $level;
266 }
267
271 public function setLanguage(?string $language): void
272 {
273 $this->language = $language;
274 }
275
279 public function setMustMatch(?string $mustMatch): void
280 {
281 $this->mustMatch = $mustMatch;
282 }
283}
__construct(?string $field=null, ?float $boost=null, ?string $fieldType=null, $value=null, ?int $level=null, ?string $language=null, ?string $mustMatch=null)