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
SetAssetKeyChangeModel.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\ChangeValue\AssetChangeValue
;
17
use
Commercetools\History\Models\ChangeValue\AssetChangeValueModel
;
18
22
final
class
SetAssetKeyChangeModel
extends
JsonObjectModel
implements
SetAssetKeyChange
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'SetAssetKeyChange'
;
30
protected
$type
;
31
36
protected
$change
;
37
42
protected
$previousValue
;
43
48
protected
$nextValue
;
49
54
protected
$asset
;
55
60
protected
$catalogData
;
61
66
protected
$variant
;
67
68
72
public
function
__construct
(
73
?
string
$change
=
null
,
74
?
string
$previousValue
=
null
,
75
?
string
$nextValue
=
null
,
76
?
AssetChangeValue
$asset
=
null
,
77
?
string
$catalogData
=
null
,
78
?
string
$variant
=
null
,
79
?
string
$type
=
null
80
) {
81
$this->change =
$change
;
82
$this->previousValue =
$previousValue
;
83
$this->nextValue =
$nextValue
;
84
$this->asset =
$asset
;
85
$this->catalogData =
$catalogData
;
86
$this->variant =
$variant
;
87
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
88
}
89
94
public
function
getType
()
95
{
96
if
(is_null($this->type)) {
98
$data = $this->
raw
(self::FIELD_TYPE);
99
if
(is_null($data)) {
100
return
null
;
101
}
102
$this->type = (string) $data;
103
}
104
105
return
$this->type
;
106
}
107
112
public
function
getChange
()
113
{
114
if
(is_null($this->change)) {
116
$data = $this->
raw
(self::FIELD_CHANGE);
117
if
(is_null($data)) {
118
return
null
;
119
}
120
$this->change = (string) $data;
121
}
122
123
return
$this->change
;
124
}
125
132
public
function
getPreviousValue
()
133
{
134
if
(is_null($this->previousValue)) {
136
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
137
if
(is_null($data)) {
138
return
null
;
139
}
140
$this->previousValue = (string) $data;
141
}
142
143
return
$this->previousValue
;
144
}
145
152
public
function
getNextValue
()
153
{
154
if
(is_null($this->nextValue)) {
156
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
157
if
(is_null($data)) {
158
return
null
;
159
}
160
$this->nextValue = (string) $data;
161
}
162
163
return
$this->nextValue
;
164
}
165
172
public
function
getAsset
()
173
{
174
if
(is_null($this->asset)) {
176
$data = $this->
raw
(self::FIELD_ASSET);
177
if
(is_null($data)) {
178
return
null
;
179
}
180
181
$this->asset = AssetChangeValueModel::of($data);
182
}
183
184
return
$this->asset
;
185
}
186
197
public
function
getCatalogData
()
198
{
199
if
(is_null($this->catalogData)) {
201
$data = $this->
raw
(self::FIELD_CATALOG_DATA);
202
if
(is_null($data)) {
203
return
null
;
204
}
205
$this->catalogData = (string) $data;
206
}
207
208
return
$this->catalogData
;
209
}
210
218
public
function
getVariant
()
219
{
220
if
(is_null($this->variant)) {
222
$data = $this->
raw
(self::FIELD_VARIANT);
223
if
(is_null($data)) {
224
return
null
;
225
}
226
$this->variant = (string) $data;
227
}
228
229
return
$this->variant
;
230
}
231
232
236
public
function
setChange
(?
string
$change
): void
237
{
238
$this->change =
$change
;
239
}
240
244
public
function
setPreviousValue
(?
string
$previousValue
): void
245
{
246
$this->previousValue =
$previousValue
;
247
}
248
252
public
function
setNextValue
(?
string
$nextValue
): void
253
{
254
$this->nextValue =
$nextValue
;
255
}
256
260
public
function
setAsset
(?
AssetChangeValue
$asset
): void
261
{
262
$this->asset =
$asset
;
263
}
264
268
public
function
setCatalogData
(?
string
$catalogData
): void
269
{
270
$this->catalogData =
$catalogData
;
271
}
272
276
public
function
setVariant
(?
string
$variant
): void
277
{
278
$this->variant =
$variant
;
279
}
280
281
282
283
}
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\SetAssetKeyChangeModel
Definition
SetAssetKeyChangeModel.php:23
Commercetools\History\Models\Change\SetAssetKeyChangeModel\getCatalogData
getCatalogData()
Definition
SetAssetKeyChangeModel.php:197
Commercetools\History\Models\Change\SetAssetKeyChangeModel\getNextValue
getNextValue()
Definition
SetAssetKeyChangeModel.php:152
Commercetools\History\Models\Change\SetAssetKeyChangeModel\setAsset
setAsset(?AssetChangeValue $asset)
Definition
SetAssetKeyChangeModel.php:260
Commercetools\History\Models\Change\SetAssetKeyChangeModel\$nextValue
$nextValue
Definition
SetAssetKeyChangeModel.php:48
Commercetools\History\Models\Change\SetAssetKeyChangeModel\getVariant
getVariant()
Definition
SetAssetKeyChangeModel.php:218
Commercetools\History\Models\Change\SetAssetKeyChangeModel\$change
$change
Definition
SetAssetKeyChangeModel.php:36
Commercetools\History\Models\Change\SetAssetKeyChangeModel\$catalogData
$catalogData
Definition
SetAssetKeyChangeModel.php:60
Commercetools\History\Models\Change\SetAssetKeyChangeModel\getType
getType()
Definition
SetAssetKeyChangeModel.php:94
Commercetools\History\Models\Change\SetAssetKeyChangeModel\__construct
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?AssetChangeValue $asset=null, ?string $catalogData=null, ?string $variant=null, ?string $type=null)
Definition
SetAssetKeyChangeModel.php:72
Commercetools\History\Models\Change\SetAssetKeyChangeModel\setChange
setChange(?string $change)
Definition
SetAssetKeyChangeModel.php:236
Commercetools\History\Models\Change\SetAssetKeyChangeModel\getAsset
getAsset()
Definition
SetAssetKeyChangeModel.php:172
Commercetools\History\Models\Change\SetAssetKeyChangeModel\$type
$type
Definition
SetAssetKeyChangeModel.php:30
Commercetools\History\Models\Change\SetAssetKeyChangeModel\getPreviousValue
getPreviousValue()
Definition
SetAssetKeyChangeModel.php:132
Commercetools\History\Models\Change\SetAssetKeyChangeModel\$previousValue
$previousValue
Definition
SetAssetKeyChangeModel.php:42
Commercetools\History\Models\Change\SetAssetKeyChangeModel\setPreviousValue
setPreviousValue(?string $previousValue)
Definition
SetAssetKeyChangeModel.php:244
Commercetools\History\Models\Change\SetAssetKeyChangeModel\$asset
$asset
Definition
SetAssetKeyChangeModel.php:54
Commercetools\History\Models\Change\SetAssetKeyChangeModel\setVariant
setVariant(?string $variant)
Definition
SetAssetKeyChangeModel.php:276
Commercetools\History\Models\Change\SetAssetKeyChangeModel\setCatalogData
setCatalogData(?string $catalogData)
Definition
SetAssetKeyChangeModel.php:268
Commercetools\History\Models\Change\SetAssetKeyChangeModel\setNextValue
setNextValue(?string $nextValue)
Definition
SetAssetKeyChangeModel.php:252
Commercetools\History\Models\Change\SetAssetKeyChangeModel\getChange
getChange()
Definition
SetAssetKeyChangeModel.php:112
Commercetools\History\Models\Change\SetAssetKeyChangeModel\$variant
$variant
Definition
SetAssetKeyChangeModel.php:66
Commercetools\History\Models\Change\SetAssetKeyChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
SetAssetKeyChangeModel.php:25
Commercetools\History\Models\ChangeValue\AssetChangeValueModel
Definition
AssetChangeValueModel.php:23
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetAssetKeyChange
Definition
SetAssetKeyChange.php:16
Commercetools\History\Models\ChangeValue\AssetChangeValue
Definition
AssetChangeValue.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8