commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
RemoveFieldDefinitionChangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
19 
24 {
29  private $change;
30 
35  private $previousValue;
36 
41  public function getChange()
42  {
43  return $this->change;
44  }
45 
52  public function getPreviousValue()
53  {
54  return $this->previousValue instanceof FieldDefinitionBuilder ? $this->previousValue->build() : $this->previousValue;
55  }
56 
61  public function withChange(?string $change)
62  {
63  $this->change = $change;
64 
65  return $this;
66  }
67 
72  public function withPreviousValue(?FieldDefinition $previousValue)
73  {
74  $this->previousValue = $previousValue;
75 
76  return $this;
77  }
78 
83  public function withPreviousValueBuilder(?FieldDefinitionBuilder $previousValue)
84  {
85  $this->previousValue = $previousValue;
86 
87  return $this;
88  }
89 
91  {
93  $this->change,
94  $this->previousValue instanceof FieldDefinitionBuilder ? $this->previousValue->build() : $this->previousValue
95  );
96  }
97 
98  public static function of(): RemoveFieldDefinitionChangeBuilder
99  {
100  return new self();
101  }
102 }