commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SetCustomFieldChangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class SetCustomFieldChangeBuilder implements Builder
22 {
27  private $change;
28 
33  private $previousValue;
34 
39  private $nextValue;
40 
45  private $name;
46 
51  private $customTypeId;
52 
57  public function getChange()
58  {
59  return $this->change;
60  }
61 
68  public function getPreviousValue()
69  {
70  return $this->previousValue;
71  }
72 
79  public function getNextValue()
80  {
81  return $this->nextValue;
82  }
83 
90  public function getName()
91  {
92  return $this->name;
93  }
94 
101  public function getCustomTypeId()
102  {
103  return $this->customTypeId;
104  }
105 
110  public function withChange(?string $change)
111  {
112  $this->change = $change;
113 
114  return $this;
115  }
116 
121  public function withPreviousValue( $previousValue)
122  {
123  $this->previousValue = $previousValue;
124 
125  return $this;
126  }
127 
132  public function withNextValue( $nextValue)
133  {
134  $this->nextValue = $nextValue;
135 
136  return $this;
137  }
138 
143  public function withName(?string $name)
144  {
145  $this->name = $name;
146 
147  return $this;
148  }
149 
154  public function withCustomTypeId(?string $customTypeId)
155  {
156  $this->customTypeId = $customTypeId;
157 
158  return $this;
159  }
160 
161 
162  public function build(): SetCustomFieldChange
163  {
164  return new SetCustomFieldChangeModel(
165  $this->change,
166  $this->previousValue,
167  $this->nextValue,
168  $this->name,
169  $this->customTypeId
170  );
171  }
172 
173  public static function of(): SetCustomFieldChangeBuilder
174  {
175  return new self();
176  }
177 }