commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
UpdateSyncInfoChangeModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
18 
23 {
24 
25  public const DISCRIMINATOR_VALUE = 'UpdateSyncInfoChange';
30  protected $type;
31 
36  protected $change;
37 
42  protected $nextValue;
43 
48  protected $channelId;
49 
50 
54  public function __construct(
55  ?string $change = null,
56  ?SyncInfo $nextValue = null,
57  ?string $channelId = null,
58  ?string $type = null
59  ) {
60  $this->change = $change;
61  $this->nextValue = $nextValue;
62  $this->channelId = $channelId;
63  $this->type = $type ?? self::DISCRIMINATOR_VALUE;
64  }
65 
70  public function getType()
71  {
72  if (is_null($this->type)) {
74  $data = $this->raw(self::FIELD_TYPE);
75  if (is_null($data)) {
76  return null;
77  }
78  $this->type = (string) $data;
79  }
80 
81  return $this->type;
82  }
83 
88  public function getChange()
89  {
90  if (is_null($this->change)) {
92  $data = $this->raw(self::FIELD_CHANGE);
93  if (is_null($data)) {
94  return null;
95  }
96  $this->change = (string) $data;
97  }
98 
99  return $this->change;
100  }
101 
108  public function getNextValue()
109  {
110  if (is_null($this->nextValue)) {
112  $data = $this->raw(self::FIELD_NEXT_VALUE);
113  if (is_null($data)) {
114  return null;
115  }
116 
117  $this->nextValue = SyncInfoModel::of($data);
118  }
119 
120  return $this->nextValue;
121  }
122 
129  public function getChannelId()
130  {
131  if (is_null($this->channelId)) {
133  $data = $this->raw(self::FIELD_CHANNEL_ID);
134  if (is_null($data)) {
135  return null;
136  }
137  $this->channelId = (string) $data;
138  }
139 
140  return $this->channelId;
141  }
142 
143 
147  public function setChange(?string $change): void
148  {
149  $this->change = $change;
150  }
151 
155  public function setNextValue(?SyncInfo $nextValue): void
156  {
157  $this->nextValue = $nextValue;
158  }
159 
163  public function setChannelId(?string $channelId): void
164  {
165  $this->channelId = $channelId;
166  }
167 
168 
169 
170 }
__construct(?string $change=null, ?SyncInfo $nextValue=null, ?string $channelId=null, ?string $type=null)