commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SearchFullTextValueBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class SearchFullTextValueBuilder implements Builder
22 {
27  private $field;
28 
33  private $boost;
34 
39  private $fieldType;
40 
45  private $value;
46 
51  private $language;
52 
57  private $mustMatch;
58 
63  public function getField()
64  {
65  return $this->field;
66  }
67 
72  public function getBoost()
73  {
74  return $this->boost;
75  }
76 
83  public function getFieldType()
84  {
85  return $this->fieldType;
86  }
87 
92  public function getValue()
93  {
94  return $this->value;
95  }
96 
103  public function getLanguage()
104  {
105  return $this->language;
106  }
107 
112  public function getMustMatch()
113  {
114  return $this->mustMatch;
115  }
116 
121  public function withField(?string $field)
122  {
123  $this->field = $field;
124 
125  return $this;
126  }
127 
132  public function withBoost(?float $boost)
133  {
134  $this->boost = $boost;
135 
136  return $this;
137  }
138 
143  public function withFieldType(?string $fieldType)
144  {
145  $this->fieldType = $fieldType;
146 
147  return $this;
148  }
149 
154  public function withValue($value)
155  {
156  $this->value = $value;
157 
158  return $this;
159  }
160 
165  public function withLanguage(?string $language)
166  {
167  $this->language = $language;
168 
169  return $this;
170  }
171 
176  public function withMustMatch(?string $mustMatch)
177  {
178  $this->mustMatch = $mustMatch;
179 
180  return $this;
181  }
182 
183 
184  public function build(): SearchFullTextValue
185  {
186  return new SearchFullTextValueModel(
187  $this->field,
188  $this->boost,
189  $this->fieldType,
190  $this->value,
191  $this->language,
192  $this->mustMatch
193  );
194  }
195 
196  public static function of(): SearchFullTextValueBuilder
197  {
198  return new self();
199  }
200 }