commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetReferencesChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
18
22final class SetReferencesChangeBuilder implements Builder
23{
28 private $change;
29
34 private $addedItems;
35
40 private $removedItems;
41
46 private $previousValue;
47
52 private $nextValue;
53
58 public function getChange()
59 {
60 return $this->change;
61 }
62
69 public function getAddedItems()
70 {
71 return $this->addedItems;
72 }
73
80 public function getRemovedItems()
81 {
82 return $this->removedItems;
83 }
84
91 public function getPreviousValue()
92 {
93 return $this->previousValue;
94 }
95
102 public function getNextValue()
103 {
104 return $this->nextValue;
105 }
106
111 public function withChange(?string $change)
112 {
113 $this->change = $change;
114
115 return $this;
116 }
117
122 public function withAddedItems(?ReferenceCollection $addedItems)
123 {
124 $this->addedItems = $addedItems;
125
126 return $this;
127 }
128
133 public function withRemovedItems(?ReferenceCollection $removedItems)
134 {
135 $this->removedItems = $removedItems;
136
137 return $this;
138 }
139
144 public function withPreviousValue(?ReferenceCollection $previousValue)
145 {
146 $this->previousValue = $previousValue;
147
148 return $this;
149 }
150
155 public function withNextValue(?ReferenceCollection $nextValue)
156 {
157 $this->nextValue = $nextValue;
158
159 return $this;
160 }
161
162
163 public function build(): SetReferencesChange
164 {
165 return new SetReferencesChangeModel(
166 $this->change,
167 $this->addedItems,
168 $this->removedItems,
169 $this->previousValue,
170 $this->nextValue
171 );
172 }
173
174 public static function of(): SetReferencesChangeBuilder
175 {
176 return new self();
177 }
178}