commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
FacetRangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class FacetRangeBuilder implements Builder
22 {
27  private $from;
28 
33  private $fromStr;
34 
39  private $to;
40 
45  private $toStr;
46 
51  private $count;
52 
57  private $productCount;
58 
63  private $total;
64 
69  private $min;
70 
75  private $max;
76 
81  private $mean;
82 
87  public function getFrom()
88  {
89  return $this->from;
90  }
91 
96  public function getFromStr()
97  {
98  return $this->fromStr;
99  }
100 
105  public function getTo()
106  {
107  return $this->to;
108  }
109 
114  public function getToStr()
115  {
116  return $this->toStr;
117  }
118 
123  public function getCount()
124  {
125  return $this->count;
126  }
127 
132  public function getProductCount()
133  {
134  return $this->productCount;
135  }
136 
141  public function getTotal()
142  {
143  return $this->total;
144  }
145 
150  public function getMin()
151  {
152  return $this->min;
153  }
154 
159  public function getMax()
160  {
161  return $this->max;
162  }
163 
168  public function getMean()
169  {
170  return $this->mean;
171  }
172 
177  public function withFrom(?float $from)
178  {
179  $this->from = $from;
180 
181  return $this;
182  }
183 
188  public function withFromStr(?string $fromStr)
189  {
190  $this->fromStr = $fromStr;
191 
192  return $this;
193  }
194 
199  public function withTo(?float $to)
200  {
201  $this->to = $to;
202 
203  return $this;
204  }
205 
210  public function withToStr(?string $toStr)
211  {
212  $this->toStr = $toStr;
213 
214  return $this;
215  }
216 
221  public function withCount(?int $count)
222  {
223  $this->count = $count;
224 
225  return $this;
226  }
227 
232  public function withProductCount(?int $productCount)
233  {
234  $this->productCount = $productCount;
235 
236  return $this;
237  }
238 
243  public function withTotal(?float $total)
244  {
245  $this->total = $total;
246 
247  return $this;
248  }
249 
254  public function withMin(?float $min)
255  {
256  $this->min = $min;
257 
258  return $this;
259  }
260 
265  public function withMax(?float $max)
266  {
267  $this->max = $max;
268 
269  return $this;
270  }
271 
276  public function withMean(?float $mean)
277  {
278  $this->mean = $mean;
279 
280  return $this;
281  }
282 
283 
284  public function build(): FacetRange
285  {
286  return new FacetRangeModel(
287  $this->from,
288  $this->fromStr,
289  $this->to,
290  $this->toStr,
291  $this->count,
292  $this->productCount,
293  $this->total,
294  $this->min,
295  $this->max,
296  $this->mean
297  );
298  }
299 
300  public static function of(): FacetRangeBuilder
301  {
302  return new self();
303  }
304 }