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
ChangeLabelChangeModel.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\LocalizedString
;
17
use
Commercetools\History\Models\Common\LocalizedStringModel
;
18
22
final
class
ChangeLabelChangeModel
extends
JsonObjectModel
implements
ChangeLabelChange
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'ChangeLabelChange'
;
30
protected
$type
;
31
36
protected
$change
;
37
42
protected
$previousValue
;
43
48
protected
$nextValue
;
49
54
protected
$fieldName
;
55
60
protected
$attributeName
;
61
62
66
public
function
__construct
(
67
?
string
$change
=
null
,
68
?
LocalizedString
$previousValue
=
null
,
69
?
LocalizedString
$nextValue
=
null
,
70
?
string
$fieldName
=
null
,
71
?
string
$attributeName
=
null
,
72
?
string
$type
=
null
73
) {
74
$this->change =
$change
;
75
$this->previousValue =
$previousValue
;
76
$this->nextValue =
$nextValue
;
77
$this->fieldName =
$fieldName
;
78
$this->attributeName =
$attributeName
;
79
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
80
}
81
86
public
function
getType
()
87
{
88
if
(is_null($this->type)) {
90
$data = $this->
raw
(self::FIELD_TYPE);
91
if
(is_null($data)) {
92
return
null
;
93
}
94
$this->type = (string) $data;
95
}
96
97
return
$this->type
;
98
}
99
104
public
function
getChange
()
105
{
106
if
(is_null($this->change)) {
108
$data = $this->
raw
(self::FIELD_CHANGE);
109
if
(is_null($data)) {
110
return
null
;
111
}
112
$this->change = (string) $data;
113
}
114
115
return
$this->change
;
116
}
117
124
public
function
getPreviousValue
()
125
{
126
if
(is_null($this->previousValue)) {
128
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
129
if
(is_null($data)) {
130
return
null
;
131
}
132
133
$this->previousValue = LocalizedStringModel::of($data);
134
}
135
136
return
$this->previousValue
;
137
}
138
145
public
function
getNextValue
()
146
{
147
if
(is_null($this->nextValue)) {
149
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
150
if
(is_null($data)) {
151
return
null
;
152
}
153
154
$this->nextValue = LocalizedStringModel::of($data);
155
}
156
157
return
$this->nextValue
;
158
}
159
166
public
function
getFieldName
()
167
{
168
if
(is_null($this->fieldName)) {
170
$data = $this->
raw
(self::FIELD_FIELD_NAME);
171
if
(is_null($data)) {
172
return
null
;
173
}
174
$this->fieldName = (string) $data;
175
}
176
177
return
$this->fieldName
;
178
}
179
186
public
function
getAttributeName
()
187
{
188
if
(is_null($this->attributeName)) {
190
$data = $this->
raw
(self::FIELD_ATTRIBUTE_NAME);
191
if
(is_null($data)) {
192
return
null
;
193
}
194
$this->attributeName = (string) $data;
195
}
196
197
return
$this->attributeName
;
198
}
199
200
204
public
function
setChange
(?
string
$change
): void
205
{
206
$this->change =
$change
;
207
}
208
212
public
function
setPreviousValue
(?
LocalizedString
$previousValue
): void
213
{
214
$this->previousValue =
$previousValue
;
215
}
216
220
public
function
setNextValue
(?
LocalizedString
$nextValue
): void
221
{
222
$this->nextValue =
$nextValue
;
223
}
224
228
public
function
setFieldName
(?
string
$fieldName
): void
229
{
230
$this->fieldName =
$fieldName
;
231
}
232
236
public
function
setAttributeName
(?
string
$attributeName
): void
237
{
238
$this->attributeName =
$attributeName
;
239
}
240
241
242
243
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
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\ChangeLabelChangeModel
Definition
ChangeLabelChangeModel.php:23
Commercetools\History\Models\Change\ChangeLabelChangeModel\$fieldName
$fieldName
Definition
ChangeLabelChangeModel.php:54
Commercetools\History\Models\Change\ChangeLabelChangeModel\setChange
setChange(?string $change)
Definition
ChangeLabelChangeModel.php:204
Commercetools\History\Models\Change\ChangeLabelChangeModel\setNextValue
setNextValue(?LocalizedString $nextValue)
Definition
ChangeLabelChangeModel.php:220
Commercetools\History\Models\Change\ChangeLabelChangeModel\$type
$type
Definition
ChangeLabelChangeModel.php:30
Commercetools\History\Models\Change\ChangeLabelChangeModel\$attributeName
$attributeName
Definition
ChangeLabelChangeModel.php:60
Commercetools\History\Models\Change\ChangeLabelChangeModel\getType
getType()
Definition
ChangeLabelChangeModel.php:86
Commercetools\History\Models\Change\ChangeLabelChangeModel\getChange
getChange()
Definition
ChangeLabelChangeModel.php:104
Commercetools\History\Models\Change\ChangeLabelChangeModel\$nextValue
$nextValue
Definition
ChangeLabelChangeModel.php:48
Commercetools\History\Models\Change\ChangeLabelChangeModel\getAttributeName
getAttributeName()
Definition
ChangeLabelChangeModel.php:186
Commercetools\History\Models\Change\ChangeLabelChangeModel\setAttributeName
setAttributeName(?string $attributeName)
Definition
ChangeLabelChangeModel.php:236
Commercetools\History\Models\Change\ChangeLabelChangeModel\setPreviousValue
setPreviousValue(?LocalizedString $previousValue)
Definition
ChangeLabelChangeModel.php:212
Commercetools\History\Models\Change\ChangeLabelChangeModel\setFieldName
setFieldName(?string $fieldName)
Definition
ChangeLabelChangeModel.php:228
Commercetools\History\Models\Change\ChangeLabelChangeModel\$change
$change
Definition
ChangeLabelChangeModel.php:36
Commercetools\History\Models\Change\ChangeLabelChangeModel\$previousValue
$previousValue
Definition
ChangeLabelChangeModel.php:42
Commercetools\History\Models\Change\ChangeLabelChangeModel\getNextValue
getNextValue()
Definition
ChangeLabelChangeModel.php:145
Commercetools\History\Models\Change\ChangeLabelChangeModel\getPreviousValue
getPreviousValue()
Definition
ChangeLabelChangeModel.php:124
Commercetools\History\Models\Change\ChangeLabelChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
ChangeLabelChangeModel.php:25
Commercetools\History\Models\Change\ChangeLabelChangeModel\__construct
__construct(?string $change=null, ?LocalizedString $previousValue=null, ?LocalizedString $nextValue=null, ?string $fieldName=null, ?string $attributeName=null, ?string $type=null)
Definition
ChangeLabelChangeModel.php:66
Commercetools\History\Models\Change\ChangeLabelChangeModel\getFieldName
getFieldName()
Definition
ChangeLabelChangeModel.php:166
Commercetools\History\Models\Common\LocalizedStringModel
Definition
LocalizedStringModel.php:17
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\ChangeLabelChange
Definition
ChangeLabelChange.php:16
Commercetools\History\Models\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8