commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SetAssetCustomFieldChangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
19 
24 {
29  private $change;
30 
35  private $previousValue;
36 
41  private $nextValue;
42 
47  private $name;
48 
53  private $customTypeId;
54 
59  private $asset;
60 
65  public function getChange()
66  {
67  return $this->change;
68  }
69 
76  public function getPreviousValue()
77  {
78  return $this->previousValue;
79  }
80 
87  public function getNextValue()
88  {
89  return $this->nextValue;
90  }
91 
98  public function getName()
99  {
100  return $this->name;
101  }
102 
109  public function getCustomTypeId()
110  {
111  return $this->customTypeId;
112  }
113 
120  public function getAsset()
121  {
122  return $this->asset instanceof AssetChangeValueBuilder ? $this->asset->build() : $this->asset;
123  }
124 
129  public function withChange(?string $change)
130  {
131  $this->change = $change;
132 
133  return $this;
134  }
135 
140  public function withPreviousValue( $previousValue)
141  {
142  $this->previousValue = $previousValue;
143 
144  return $this;
145  }
146 
151  public function withNextValue( $nextValue)
152  {
153  $this->nextValue = $nextValue;
154 
155  return $this;
156  }
157 
162  public function withName(?string $name)
163  {
164  $this->name = $name;
165 
166  return $this;
167  }
168 
173  public function withCustomTypeId(?string $customTypeId)
174  {
175  $this->customTypeId = $customTypeId;
176 
177  return $this;
178  }
179 
184  public function withAsset(?AssetChangeValue $asset)
185  {
186  $this->asset = $asset;
187 
188  return $this;
189  }
190 
195  public function withAssetBuilder(?AssetChangeValueBuilder $asset)
196  {
197  $this->asset = $asset;
198 
199  return $this;
200  }
201 
202  public function build(): SetAssetCustomFieldChange
203  {
205  $this->change,
206  $this->previousValue,
207  $this->nextValue,
208  $this->name,
209  $this->customTypeId,
210  $this->asset instanceof AssetChangeValueBuilder ? $this->asset->build() : $this->asset
211  );
212  }
213 
214  public static function of(): SetAssetCustomFieldChangeBuilder
215  {
216  return new self();
217  }
218 }