commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetInputTipChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
19
23final class SetInputTipChangeBuilder implements Builder
24{
29 private $change;
30
35 private $previousValue;
36
41 private $nextValue;
42
47 private $attributeName;
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
86 public function getAttributeName()
87 {
88 return $this->attributeName;
89 }
90
95 public function withChange(?string $change)
96 {
97 $this->change = $change;
98
99 return $this;
100 }
101
106 public function withPreviousValue(?LocalizedString $previousValue)
107 {
108 $this->previousValue = $previousValue;
109
110 return $this;
111 }
112
117 public function withNextValue(?LocalizedString $nextValue)
118 {
119 $this->nextValue = $nextValue;
120
121 return $this;
122 }
123
128 public function withAttributeName(?string $attributeName)
129 {
130 $this->attributeName = $attributeName;
131
132 return $this;
133 }
134
139 public function withPreviousValueBuilder(?LocalizedStringBuilder $previousValue)
140 {
141 $this->previousValue = $previousValue;
142
143 return $this;
144 }
145
150 public function withNextValueBuilder(?LocalizedStringBuilder $nextValue)
151 {
152 $this->nextValue = $nextValue;
153
154 return $this;
155 }
156
157 public function build(): SetInputTipChange
158 {
159 return new SetInputTipChangeModel(
160 $this->change,
161 $this->previousValue instanceof LocalizedStringBuilder ? $this->previousValue->build() : $this->previousValue,
162 $this->nextValue instanceof LocalizedStringBuilder ? $this->nextValue->build() : $this->nextValue,
163 $this->attributeName
164 );
165 }
166
167 public static function of(): SetInputTipChangeBuilder
168 {
169 return new self();
170 }
171}