commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-history
src
Models
Change
AddLocalizedEnumValueChangeModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Change
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
use
Commercetools\History\Models\Common\AttributeLocalizedEnumValue
;
17
use
Commercetools\History\Models\Common\AttributeLocalizedEnumValueModel
;
18
22
final
class
AddLocalizedEnumValueChangeModel
extends
JsonObjectModel
implements
AddLocalizedEnumValueChange
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'AddLocalizedEnumValueChange'
;
30
protected
$type
;
31
36
protected
$change
;
37
42
protected
$nextValue
;
43
48
protected
$fieldName
;
49
54
protected
$attributeName
;
55
56
60
public
function
__construct
(
61
?
string
$change
=
null
,
62
?
AttributeLocalizedEnumValue
$nextValue
=
null
,
63
?
string
$fieldName
=
null
,
64
?
string
$attributeName
=
null
,
65
?
string
$type
=
null
66
) {
67
$this->change =
$change
;
68
$this->nextValue =
$nextValue
;
69
$this->fieldName =
$fieldName
;
70
$this->attributeName =
$attributeName
;
71
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
72
}
73
78
public
function
getType
()
79
{
80
if
(is_null($this->type)) {
82
$data = $this->
raw
(self::FIELD_TYPE);
83
if
(is_null($data)) {
84
return
null
;
85
}
86
$this->type = (string) $data;
87
}
88
89
return
$this->type
;
90
}
91
96
public
function
getChange
()
97
{
98
if
(is_null($this->change)) {
100
$data = $this->
raw
(self::FIELD_CHANGE);
101
if
(is_null($data)) {
102
return
null
;
103
}
104
$this->change = (string) $data;
105
}
106
107
return
$this->change
;
108
}
109
116
public
function
getNextValue
()
117
{
118
if
(is_null($this->nextValue)) {
120
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
121
if
(is_null($data)) {
122
return
null
;
123
}
124
125
$this->nextValue =
AttributeLocalizedEnumValueModel::of
($data);
126
}
127
128
return
$this->nextValue
;
129
}
130
137
public
function
getFieldName
()
138
{
139
if
(is_null($this->fieldName)) {
141
$data = $this->
raw
(self::FIELD_FIELD_NAME);
142
if
(is_null($data)) {
143
return
null
;
144
}
145
$this->fieldName = (string) $data;
146
}
147
148
return
$this->fieldName
;
149
}
150
157
public
function
getAttributeName
()
158
{
159
if
(is_null($this->attributeName)) {
161
$data = $this->
raw
(self::FIELD_ATTRIBUTE_NAME);
162
if
(is_null($data)) {
163
return
null
;
164
}
165
$this->attributeName = (string) $data;
166
}
167
168
return
$this->attributeName
;
169
}
170
171
175
public
function
setChange
(?
string
$change
): void
176
{
177
$this->change =
$change
;
178
}
179
183
public
function
setNextValue
(?
AttributeLocalizedEnumValue
$nextValue
): void
184
{
185
$this->nextValue =
$nextValue
;
186
}
187
191
public
function
setFieldName
(?
string
$fieldName
): void
192
{
193
$this->fieldName =
$fieldName
;
194
}
195
199
public
function
setAttributeName
(?
string
$attributeName
): void
200
{
201
$this->attributeName =
$attributeName
;
202
}
203
204
205
206
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel
Definition
AddLocalizedEnumValueChangeModel.php:23
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\getChange
getChange()
Definition
AddLocalizedEnumValueChangeModel.php:96
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\setChange
setChange(?string $change)
Definition
AddLocalizedEnumValueChangeModel.php:175
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\getType
getType()
Definition
AddLocalizedEnumValueChangeModel.php:78
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\getFieldName
getFieldName()
Definition
AddLocalizedEnumValueChangeModel.php:137
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
AddLocalizedEnumValueChangeModel.php:25
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\$attributeName
$attributeName
Definition
AddLocalizedEnumValueChangeModel.php:54
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\getNextValue
getNextValue()
Definition
AddLocalizedEnumValueChangeModel.php:116
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\$nextValue
$nextValue
Definition
AddLocalizedEnumValueChangeModel.php:42
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\setNextValue
setNextValue(?AttributeLocalizedEnumValue $nextValue)
Definition
AddLocalizedEnumValueChangeModel.php:183
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\getAttributeName
getAttributeName()
Definition
AddLocalizedEnumValueChangeModel.php:157
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\setFieldName
setFieldName(?string $fieldName)
Definition
AddLocalizedEnumValueChangeModel.php:191
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\$fieldName
$fieldName
Definition
AddLocalizedEnumValueChangeModel.php:48
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\setAttributeName
setAttributeName(?string $attributeName)
Definition
AddLocalizedEnumValueChangeModel.php:199
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\$type
$type
Definition
AddLocalizedEnumValueChangeModel.php:30
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\__construct
__construct(?string $change=null, ?AttributeLocalizedEnumValue $nextValue=null, ?string $fieldName=null, ?string $attributeName=null, ?string $type=null)
Definition
AddLocalizedEnumValueChangeModel.php:60
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel\$change
$change
Definition
AddLocalizedEnumValueChangeModel.php:36
Commercetools\History\Models\Common\AttributeLocalizedEnumValueModel
Definition
AttributeLocalizedEnumValueModel.php:21
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\AddLocalizedEnumValueChange
Definition
AddLocalizedEnumValueChange.php:16
Commercetools\History\Models\Common\AttributeLocalizedEnumValue
Definition
AttributeLocalizedEnumValue.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8