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
SetImageLabelChangeModel.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\Image
;
17
use
Commercetools\History\Models\Common\ImageModel
;
18
22
final
class
SetImageLabelChangeModel
extends
JsonObjectModel
implements
SetImageLabelChange
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'SetImageLabelChange'
;
30
protected
$type
;
31
36
protected
$change
;
37
42
protected
$previousValue
;
43
48
protected
$nextValue
;
49
54
protected
$catalogData
;
55
60
protected
$variant
;
61
62
66
public
function
__construct
(
67
?
string
$change
=
null
,
68
?
Image
$previousValue
=
null
,
69
?
Image
$nextValue
=
null
,
70
?
string
$catalogData
=
null
,
71
?
string
$variant
=
null
,
72
?
string
$type
=
null
73
) {
74
$this->change =
$change
;
75
$this->previousValue =
$previousValue
;
76
$this->nextValue =
$nextValue
;
77
$this->catalogData =
$catalogData
;
78
$this->variant =
$variant
;
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 =
ImageModel::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 =
ImageModel::of
($data);
155
}
156
157
return
$this->nextValue
;
158
}
159
170
public
function
getCatalogData
()
171
{
172
if
(is_null($this->catalogData)) {
174
$data = $this->
raw
(self::FIELD_CATALOG_DATA);
175
if
(is_null($data)) {
176
return
null
;
177
}
178
$this->catalogData = (string) $data;
179
}
180
181
return
$this->catalogData
;
182
}
183
191
public
function
getVariant
()
192
{
193
if
(is_null($this->variant)) {
195
$data = $this->
raw
(self::FIELD_VARIANT);
196
if
(is_null($data)) {
197
return
null
;
198
}
199
$this->variant = (string) $data;
200
}
201
202
return
$this->variant
;
203
}
204
205
209
public
function
setChange
(?
string
$change
): void
210
{
211
$this->change =
$change
;
212
}
213
217
public
function
setPreviousValue
(?
Image
$previousValue
): void
218
{
219
$this->previousValue =
$previousValue
;
220
}
221
225
public
function
setNextValue
(?
Image
$nextValue
): void
226
{
227
$this->nextValue =
$nextValue
;
228
}
229
233
public
function
setCatalogData
(?
string
$catalogData
): void
234
{
235
$this->catalogData =
$catalogData
;
236
}
237
241
public
function
setVariant
(?
string
$variant
): void
242
{
243
$this->variant =
$variant
;
244
}
245
246
247
248
}
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\SetImageLabelChangeModel
Definition
SetImageLabelChangeModel.php:23
Commercetools\History\Models\Change\SetImageLabelChangeModel\$variant
$variant
Definition
SetImageLabelChangeModel.php:60
Commercetools\History\Models\Change\SetImageLabelChangeModel\$nextValue
$nextValue
Definition
SetImageLabelChangeModel.php:48
Commercetools\History\Models\Change\SetImageLabelChangeModel\$previousValue
$previousValue
Definition
SetImageLabelChangeModel.php:42
Commercetools\History\Models\Change\SetImageLabelChangeModel\getNextValue
getNextValue()
Definition
SetImageLabelChangeModel.php:145
Commercetools\History\Models\Change\SetImageLabelChangeModel\getChange
getChange()
Definition
SetImageLabelChangeModel.php:104
Commercetools\History\Models\Change\SetImageLabelChangeModel\getCatalogData
getCatalogData()
Definition
SetImageLabelChangeModel.php:170
Commercetools\History\Models\Change\SetImageLabelChangeModel\setNextValue
setNextValue(?Image $nextValue)
Definition
SetImageLabelChangeModel.php:225
Commercetools\History\Models\Change\SetImageLabelChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetImageLabelChangeModel.php:25
Commercetools\History\Models\Change\SetImageLabelChangeModel\__construct
__construct(?string $change=null, ?Image $previousValue=null, ?Image $nextValue=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)
Definition
SetImageLabelChangeModel.php:66
Commercetools\History\Models\Change\SetImageLabelChangeModel\getPreviousValue
getPreviousValue()
Definition
SetImageLabelChangeModel.php:124
Commercetools\History\Models\Change\SetImageLabelChangeModel\$type
$type
Definition
SetImageLabelChangeModel.php:30
Commercetools\History\Models\Change\SetImageLabelChangeModel\setPreviousValue
setPreviousValue(?Image $previousValue)
Definition
SetImageLabelChangeModel.php:217
Commercetools\History\Models\Change\SetImageLabelChangeModel\setCatalogData
setCatalogData(?string $catalogData)
Definition
SetImageLabelChangeModel.php:233
Commercetools\History\Models\Change\SetImageLabelChangeModel\getType
getType()
Definition
SetImageLabelChangeModel.php:86
Commercetools\History\Models\Change\SetImageLabelChangeModel\setChange
setChange(?string $change)
Definition
SetImageLabelChangeModel.php:209
Commercetools\History\Models\Change\SetImageLabelChangeModel\$catalogData
$catalogData
Definition
SetImageLabelChangeModel.php:54
Commercetools\History\Models\Change\SetImageLabelChangeModel\$change
$change
Definition
SetImageLabelChangeModel.php:36
Commercetools\History\Models\Change\SetImageLabelChangeModel\getVariant
getVariant()
Definition
SetImageLabelChangeModel.php:191
Commercetools\History\Models\Change\SetImageLabelChangeModel\setVariant
setVariant(?string $variant)
Definition
SetImageLabelChangeModel.php:241
Commercetools\History\Models\Common\ImageModel
Definition
ImageModel.php:21
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetImageLabelChange
Definition
SetImageLabelChange.php:16
Commercetools\History\Models\Common\Image
Definition
Image.php:15
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8