commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
AddLocalizedEnumValueChangeBuilder.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 $fieldName;
42 
47  private $attributeName;
48 
53  public function getChange()
54  {
55  return $this->change;
56  }
57 
64  public function getNextValue()
65  {
66  return $this->nextValue instanceof AttributeLocalizedEnumValueBuilder ? $this->nextValue->build() : $this->nextValue;
67  }
68 
75  public function getFieldName()
76  {
77  return $this->fieldName;
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 withNextValue(?AttributeLocalizedEnumValue $nextValue)
107  {
108  $this->nextValue = $nextValue;
109 
110  return $this;
111  }
112 
117  public function withFieldName(?string $fieldName)
118  {
119  $this->fieldName = $fieldName;
120 
121  return $this;
122  }
123 
128  public function withAttributeName(?string $attributeName)
129  {
130  $this->attributeName = $attributeName;
131 
132  return $this;
133  }
134 
140  {
141  $this->nextValue = $nextValue;
142 
143  return $this;
144  }
145 
147  {
149  $this->change,
150  $this->nextValue instanceof AttributeLocalizedEnumValueBuilder ? $this->nextValue->build() : $this->nextValue,
151  $this->fieldName,
152  $this->attributeName
153  );
154  }
155 
156  public static function of(): AddLocalizedEnumValueChangeBuilder
157  {
158  return new self();
159  }
160 }