commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetLocalizedDescriptionChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
24{
29 private $change;
30
35 private $previousValue;
36
41 private $nextValue;
42
47 private $catalogData;
48
53 public function getChange()
54 {
55 return $this->change;
56 }
57
64 public function getPreviousValue()
65 {
66 return $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue;
67 }
68
75 public function getNextValue()
76 {
77 return $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue;
78 }
79
91 public function getCatalogData()
92 {
93 return $this->catalogData;
94 }
95
100 public function withChange(?string $change)
101 {
102 $this->change = $change;
103
104 return $this;
105 }
106
111 public function withPreviousValue(?LocalizedString $previousValue)
112 {
113 $this->previousValue = $previousValue;
114
115 return $this;
116 }
117
122 public function withNextValue(?LocalizedString $nextValue)
123 {
124 $this->nextValue = $nextValue;
125
126 return $this;
127 }
128
133 public function withCatalogData(?string $catalogData)
134 {
135 $this->catalogData = $catalogData;
136
137 return $this;
138 }
139
144 public function withPreviousValueBuilder(?LocalizedStringBuilder $previousValue)
145 {
146 $this->previousValue = $previousValue;
147
148 return $this;
149 }
150
155 public function withNextValueBuilder(?LocalizedStringBuilder $nextValue)
156 {
157 $this->nextValue = $nextValue;
158
159 return $this;
160 }
161
163 {
165 $this->change,
166 $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue,
167 $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue,
168 $this->catalogData
169 );
170 }
171
172 public static function of(): SetLocalizedDescriptionChangeBuilder
173 {
174 return new self();
175 }
176}