commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SearchExistsValueModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $field;
27 
32  protected $boost;
33 
38  protected $fieldType;
39 
44  protected $language;
45 
46 
50  public function __construct(
51  ?string $field = null,
52  ?float $boost = null,
53  ?string $fieldType = null,
54  ?string $language = null
55  ) {
56  $this->field = $field;
57  $this->boost = $boost;
58  $this->fieldType = $fieldType;
59  $this->language = $language;
60  }
61 
66  public function getField()
67  {
68  if (is_null($this->field)) {
70  $data = $this->raw(self::FIELD_FIELD);
71  if (is_null($data)) {
72  return null;
73  }
74  $this->field = (string) $data;
75  }
76 
77  return $this->field;
78  }
79 
84  public function getBoost()
85  {
86  if (is_null($this->boost)) {
88  $data = $this->raw(self::FIELD_BOOST);
89  if (is_null($data)) {
90  return null;
91  }
92  $this->boost = (float) $data;
93  }
94 
95  return $this->boost;
96  }
97 
104  public function getFieldType()
105  {
106  if (is_null($this->fieldType)) {
108  $data = $this->raw(self::FIELD_FIELD_TYPE);
109  if (is_null($data)) {
110  return null;
111  }
112  $this->fieldType = (string) $data;
113  }
114 
115  return $this->fieldType;
116  }
117 
124  public function getLanguage()
125  {
126  if (is_null($this->language)) {
128  $data = $this->raw(self::FIELD_LANGUAGE);
129  if (is_null($data)) {
130  return null;
131  }
132  $this->language = (string) $data;
133  }
134 
135  return $this->language;
136  }
137 
138 
142  public function setField(?string $field): void
143  {
144  $this->field = $field;
145  }
146 
150  public function setBoost(?float $boost): void
151  {
152  $this->boost = $boost;
153  }
154 
158  public function setFieldType(?string $fieldType): void
159  {
160  $this->fieldType = $fieldType;
161  }
162 
166  public function setLanguage(?string $language): void
167  {
168  $this->language = $language;
169  }
170 }
__construct(?string $field=null, ?float $boost=null, ?string $fieldType=null, ?string $language=null)