commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SearchExistsValueBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class SearchExistsValueBuilder implements Builder
22{
27 private $field;
28
33 private $boost;
34
39 private $fieldType;
40
45 private $language;
46
51 public function getField()
52 {
53 return $this->field;
54 }
55
60 public function getBoost()
61 {
62 return $this->boost;
63 }
64
71 public function getFieldType()
72 {
73 return $this->fieldType;
74 }
75
82 public function getLanguage()
83 {
84 return $this->language;
85 }
86
91 public function withField(?string $field)
92 {
93 $this->field = $field;
94
95 return $this;
96 }
97
102 public function withBoost(?float $boost)
103 {
104 $this->boost = $boost;
105
106 return $this;
107 }
108
113 public function withFieldType(?string $fieldType)
114 {
115 $this->fieldType = $fieldType;
116
117 return $this;
118 }
119
124 public function withLanguage(?string $language)
125 {
126 $this->language = $language;
127
128 return $this;
129 }
130
131
132 public function build(): SearchExistsValue
133 {
134 return new SearchExistsValueModel(
135 $this->field,
136 $this->boost,
137 $this->fieldType,
138 $this->language
139 );
140 }
141
142 public static function of(): SearchExistsValueBuilder
143 {
144 return new self();
145 }
146}