commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetPropertyChangeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class SetPropertyChangeBuilder implements Builder
22{
27 private $change;
28
33 private $previousValue;
34
39 private $nextValue;
40
45 private $path;
46
51 public function getChange()
52 {
53 return $this->change;
54 }
55
62 public function getPreviousValue()
63 {
64 return $this->previousValue;
65 }
66
73 public function getNextValue()
74 {
75 return $this->nextValue;
76 }
77
84 public function getPath()
85 {
86 return $this->path;
87 }
88
93 public function withChange(?string $change)
94 {
95 $this->change = $change;
96
97 return $this;
98 }
99
104 public function withPreviousValue( $previousValue)
105 {
106 $this->previousValue = $previousValue;
107
108 return $this;
109 }
110
115 public function withNextValue( $nextValue)
116 {
117 $this->nextValue = $nextValue;
118
119 return $this;
120 }
121
126 public function withPath(?string $path)
127 {
128 $this->path = $path;
129
130 return $this;
131 }
132
133
134 public function build(): SetPropertyChange
135 {
136 return new SetPropertyChangeModel(
137 $this->change,
138 $this->previousValue,
139 $this->nextValue,
140 $this->path
141 );
142 }
143
144 public static function of(): SetPropertyChangeBuilder
145 {
146 return new self();
147 }
148}