commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ChangeIsSearchableChangeModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
22 
23  public const DISCRIMINATOR_VALUE = 'ChangeIsSearchableChange';
28  protected $type;
29 
34  protected $change;
35 
40  protected $previousValue;
41 
46  protected $nextValue;
47 
52  protected $attributeName;
53 
54 
58  public function __construct(
59  ?string $change = null,
60  ?bool $previousValue = null,
61  ?bool $nextValue = null,
62  ?string $attributeName = null,
63  ?string $type = null
64  ) {
65  $this->change = $change;
66  $this->previousValue = $previousValue;
67  $this->nextValue = $nextValue;
68  $this->attributeName = $attributeName;
69  $this->type = $type ?? self::DISCRIMINATOR_VALUE;
70  }
71 
76  public function getType()
77  {
78  if (is_null($this->type)) {
80  $data = $this->raw(self::FIELD_TYPE);
81  if (is_null($data)) {
82  return null;
83  }
84  $this->type = (string) $data;
85  }
86 
87  return $this->type;
88  }
89 
94  public function getChange()
95  {
96  if (is_null($this->change)) {
98  $data = $this->raw(self::FIELD_CHANGE);
99  if (is_null($data)) {
100  return null;
101  }
102  $this->change = (string) $data;
103  }
104 
105  return $this->change;
106  }
107 
114  public function getPreviousValue()
115  {
116  if (is_null($this->previousValue)) {
118  $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
119  if (is_null($data)) {
120  return null;
121  }
122  $this->previousValue = (bool) $data;
123  }
124 
125  return $this->previousValue;
126  }
127 
134  public function getNextValue()
135  {
136  if (is_null($this->nextValue)) {
138  $data = $this->raw(self::FIELD_NEXT_VALUE);
139  if (is_null($data)) {
140  return null;
141  }
142  $this->nextValue = (bool) $data;
143  }
144 
145  return $this->nextValue;
146  }
147 
154  public function getAttributeName()
155  {
156  if (is_null($this->attributeName)) {
158  $data = $this->raw(self::FIELD_ATTRIBUTE_NAME);
159  if (is_null($data)) {
160  return null;
161  }
162  $this->attributeName = (string) $data;
163  }
164 
165  return $this->attributeName;
166  }
167 
168 
172  public function setChange(?string $change): void
173  {
174  $this->change = $change;
175  }
176 
180  public function setPreviousValue(?bool $previousValue): void
181  {
182  $this->previousValue = $previousValue;
183  }
184 
188  public function setNextValue(?bool $nextValue): void
189  {
190  $this->nextValue = $nextValue;
191  }
192 
196  public function setAttributeName(?string $attributeName): void
197  {
198  $this->attributeName = $attributeName;
199  }
200 
201 
202 
203 }
__construct(?string $change=null, ?bool $previousValue=null, ?bool $nextValue=null, ?string $attributeName=null, ?string $type=null)