commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
RemoveEnumValuesChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
18
23{
24
25 public const DISCRIMINATOR_VALUE = 'RemoveEnumValuesChange';
30 protected $type;
31
36 protected $change;
37
42 protected $previousValue;
43
48 protected $attributeName;
49
50
54 public function __construct(
55 ?string $change = null,
57 ?string $attributeName = null,
58 ?string $type = null
59 ) {
60 $this->change = $change;
61 $this->previousValue = $previousValue;
62 $this->attributeName = $attributeName;
63 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
64 }
65
70 public function getType()
71 {
72 if (is_null($this->type)) {
74 $data = $this->raw(self::FIELD_TYPE);
75 if (is_null($data)) {
76 return null;
77 }
78 $this->type = (string) $data;
79 }
80
81 return $this->type;
82 }
83
88 public function getChange()
89 {
90 if (is_null($this->change)) {
92 $data = $this->raw(self::FIELD_CHANGE);
93 if (is_null($data)) {
94 return null;
95 }
96 $this->change = (string) $data;
97 }
98
99 return $this->change;
100 }
101
108 public function getPreviousValue()
109 {
110 if (is_null($this->previousValue)) {
112 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
113 if (is_null($data)) {
114 return null;
115 }
116
117 $this->previousValue = EnumValueModel::of($data);
118 }
119
121 }
122
129 public function getAttributeName()
130 {
131 if (is_null($this->attributeName)) {
133 $data = $this->raw(self::FIELD_ATTRIBUTE_NAME);
134 if (is_null($data)) {
135 return null;
136 }
137 $this->attributeName = (string) $data;
138 }
139
141 }
142
143
147 public function setChange(?string $change): void
148 {
149 $this->change = $change;
150 }
151
156 {
157 $this->previousValue = $previousValue;
158 }
159
163 public function setAttributeName(?string $attributeName): void
164 {
165 $this->attributeName = $attributeName;
166 }
167
168
169
170}
__construct(?string $change=null, ?EnumValue $previousValue=null, ?string $attributeName=null, ?string $type=null)