commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
AddPlainEnumValueChangeBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
19 
24 {
29  private $change;
30 
35  private $nextValue;
36 
41  private $attributeName;
42 
47  public function getChange()
48  {
49  return $this->change;
50  }
51 
58  public function getNextValue()
59  {
60  return $this->nextValue instanceof AttributePlainEnumValueBuilder ? $this->nextValue->build() : $this->nextValue;
61  }
62 
69  public function getAttributeName()
70  {
71  return $this->attributeName;
72  }
73 
78  public function withChange(?string $change)
79  {
80  $this->change = $change;
81 
82  return $this;
83  }
84 
89  public function withNextValue(?AttributePlainEnumValue $nextValue)
90  {
91  $this->nextValue = $nextValue;
92 
93  return $this;
94  }
95 
100  public function withAttributeName(?string $attributeName)
101  {
102  $this->attributeName = $attributeName;
103 
104  return $this;
105  }
106 
112  {
113  $this->nextValue = $nextValue;
114 
115  return $this;
116  }
117 
118  public function build(): AddPlainEnumValueChange
119  {
120  return new AddPlainEnumValueChangeModel(
121  $this->change,
122  $this->nextValue instanceof AttributePlainEnumValueBuilder ? $this->nextValue->build() : $this->nextValue,
123  $this->attributeName
124  );
125  }
126 
127  public static function of(): AddPlainEnumValueChangeBuilder
128  {
129  return new self();
130  }
131 }