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
RemoveImageChangeModel.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\ImageCollection
;
17
21
final
class
RemoveImageChangeModel
extends
JsonObjectModel
implements
RemoveImageChange
22
{
23
24
public
const
DISCRIMINATOR_VALUE
=
'RemoveImageChange'
;
29
protected
$type
;
30
35
protected
$change
;
36
41
protected
$previousValue
;
42
47
protected
$nextValue
;
48
53
protected
$catalogData
;
54
55
59
public
function
__construct
(
60
?
string
$change
=
null
,
61
?
ImageCollection
$previousValue
=
null
,
62
?
ImageCollection
$nextValue
=
null
,
63
?
string
$catalogData
=
null
,
64
?
string
$type
=
null
65
) {
66
$this->change =
$change
;
67
$this->previousValue =
$previousValue
;
68
$this->nextValue =
$nextValue
;
69
$this->catalogData =
$catalogData
;
70
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
71
}
72
77
public
function
getType
()
78
{
79
if
(is_null($this->type)) {
81
$data = $this->
raw
(self::FIELD_TYPE);
82
if
(is_null($data)) {
83
return
null
;
84
}
85
$this->type = (string) $data;
86
}
87
88
return
$this->type
;
89
}
90
95
public
function
getChange
()
96
{
97
if
(is_null($this->change)) {
99
$data = $this->
raw
(self::FIELD_CHANGE);
100
if
(is_null($data)) {
101
return
null
;
102
}
103
$this->change = (string) $data;
104
}
105
106
return
$this->change
;
107
}
108
115
public
function
getPreviousValue
()
116
{
117
if
(is_null($this->previousValue)) {
119
$data = $this->
raw
(self::FIELD_PREVIOUS_VALUE);
120
if
(is_null($data)) {
121
return
null
;
122
}
123
$this->previousValue = ImageCollection::fromArray($data);
124
}
125
126
return
$this->previousValue
;
127
}
128
135
public
function
getNextValue
()
136
{
137
if
(is_null($this->nextValue)) {
139
$data = $this->
raw
(self::FIELD_NEXT_VALUE);
140
if
(is_null($data)) {
141
return
null
;
142
}
143
$this->nextValue = ImageCollection::fromArray($data);
144
}
145
146
return
$this->nextValue
;
147
}
148
158
public
function
getCatalogData
()
159
{
160
if
(is_null($this->catalogData)) {
162
$data = $this->
raw
(self::FIELD_CATALOG_DATA);
163
if
(is_null($data)) {
164
return
null
;
165
}
166
$this->catalogData = (string) $data;
167
}
168
169
return
$this->catalogData
;
170
}
171
172
176
public
function
setChange
(?
string
$change
): void
177
{
178
$this->change =
$change
;
179
}
180
184
public
function
setPreviousValue
(?
ImageCollection
$previousValue
): void
185
{
186
$this->previousValue =
$previousValue
;
187
}
188
192
public
function
setNextValue
(?
ImageCollection
$nextValue
): void
193
{
194
$this->nextValue =
$nextValue
;
195
}
196
200
public
function
setCatalogData
(?
string
$catalogData
): void
201
{
202
$this->catalogData =
$catalogData
;
203
}
204
205
206
207
}
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\RemoveImageChangeModel
Definition
RemoveImageChangeModel.php:22
Commercetools\History\Models\Change\RemoveImageChangeModel\getCatalogData
getCatalogData()
Definition
RemoveImageChangeModel.php:158
Commercetools\History\Models\Change\RemoveImageChangeModel\setChange
setChange(?string $change)
Definition
RemoveImageChangeModel.php:176
Commercetools\History\Models\Change\RemoveImageChangeModel\getPreviousValue
getPreviousValue()
Definition
RemoveImageChangeModel.php:115
Commercetools\History\Models\Change\RemoveImageChangeModel\$change
$change
Definition
RemoveImageChangeModel.php:35
Commercetools\History\Models\Change\RemoveImageChangeModel\$previousValue
$previousValue
Definition
RemoveImageChangeModel.php:41
Commercetools\History\Models\Change\RemoveImageChangeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
RemoveImageChangeModel.php:24
Commercetools\History\Models\Change\RemoveImageChangeModel\getType
getType()
Definition
RemoveImageChangeModel.php:77
Commercetools\History\Models\Change\RemoveImageChangeModel\getNextValue
getNextValue()
Definition
RemoveImageChangeModel.php:135
Commercetools\History\Models\Change\RemoveImageChangeModel\setNextValue
setNextValue(?ImageCollection $nextValue)
Definition
RemoveImageChangeModel.php:192
Commercetools\History\Models\Change\RemoveImageChangeModel\$nextValue
$nextValue
Definition
RemoveImageChangeModel.php:47
Commercetools\History\Models\Change\RemoveImageChangeModel\setPreviousValue
setPreviousValue(?ImageCollection $previousValue)
Definition
RemoveImageChangeModel.php:184
Commercetools\History\Models\Change\RemoveImageChangeModel\$catalogData
$catalogData
Definition
RemoveImageChangeModel.php:53
Commercetools\History\Models\Change\RemoveImageChangeModel\$type
$type
Definition
RemoveImageChangeModel.php:29
Commercetools\History\Models\Change\RemoveImageChangeModel\getChange
getChange()
Definition
RemoveImageChangeModel.php:95
Commercetools\History\Models\Change\RemoveImageChangeModel\setCatalogData
setCatalogData(?string $catalogData)
Definition
RemoveImageChangeModel.php:200
Commercetools\History\Models\Change\RemoveImageChangeModel\__construct
__construct(?string $change=null, ?ImageCollection $previousValue=null, ?ImageCollection $nextValue=null, ?string $catalogData=null, ?string $type=null)
Definition
RemoveImageChangeModel.php:59
Commercetools\History\Models\Common\ImageCollection
Definition
ImageCollection.php:22
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\RemoveImageChange
Definition
RemoveImageChange.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8