commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
RemoveAssetChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
23final class RemoveAssetChangeBuilder implements Builder
24{
29 private $change;
30
35 private $previousValue;
36
41 private $catalogData;
42
47 private $variant;
48
53 public function getChange()
54 {
55 return $this->change;
56 }
57
64 public function getPreviousValue()
65 {
66 return $this->previousValue instanceof AssetBuilder ? $this->previousValue->build() : $this->previousValue;
67 }
68
79 public function getCatalogData()
80 {
81 return $this->catalogData;
82 }
83
91 public function getVariant()
92 {
93 return $this->variant;
94 }
95
100 public function withChange(?string $change)
101 {
102 $this->change = $change;
103
104 return $this;
105 }
106
111 public function withPreviousValue(?Asset $previousValue)
112 {
113 $this->previousValue = $previousValue;
114
115 return $this;
116 }
117
122 public function withCatalogData(?string $catalogData)
123 {
124 $this->catalogData = $catalogData;
125
126 return $this;
127 }
128
133 public function withVariant(?string $variant)
134 {
135 $this->variant = $variant;
136
137 return $this;
138 }
139
144 public function withPreviousValueBuilder(?AssetBuilder $previousValue)
145 {
146 $this->previousValue = $previousValue;
147
148 return $this;
149 }
150
151 public function build(): RemoveAssetChange
152 {
153 return new RemoveAssetChangeModel(
154 $this->change,
155 $this->previousValue instanceof AssetBuilder ? $this->previousValue->build() : $this->previousValue,
156 $this->catalogData,
157 $this->variant
158 );
159 }
160
161 public static function of(): RemoveAssetChangeBuilder
162 {
163 return new self();
164 }
165}