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
SetAssetSourcesChangeBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Change
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
use
Commercetools\History\Models\ChangeValue\AssetChangeValue
;
18
use
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder
;
19
use
Commercetools\History\Models\Common\AssetSourceCollection
;
20
24
final
class
SetAssetSourcesChangeBuilder
implements
Builder
25
{
30
private
$change;
31
36
private
$previousValue;
37
42
private
$nextValue;
43
48
private
$asset;
49
54
private
$catalogData;
55
60
private
$variant;
61
66
public
function
getChange
()
67
{
68
return
$this->change;
69
}
70
77
public
function
getPreviousValue
()
78
{
79
return
$this->previousValue;
80
}
81
88
public
function
getNextValue
()
89
{
90
return
$this->nextValue;
91
}
92
99
public
function
getAsset
()
100
{
101
return
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset;
102
}
103
114
public
function
getCatalogData
()
115
{
116
return
$this->catalogData;
117
}
118
126
public
function
getVariant
()
127
{
128
return
$this->variant;
129
}
130
135
public
function
withChange
(?
string
$change)
136
{
137
$this->change = $change;
138
139
return
$this;
140
}
141
146
public
function
withPreviousValue
(?
AssetSourceCollection
$previousValue)
147
{
148
$this->previousValue = $previousValue;
149
150
return
$this;
151
}
152
157
public
function
withNextValue
(?
AssetSourceCollection
$nextValue)
158
{
159
$this->nextValue = $nextValue;
160
161
return
$this;
162
}
163
168
public
function
withAsset
(?
AssetChangeValue
$asset)
169
{
170
$this->asset = $asset;
171
172
return
$this;
173
}
174
179
public
function
withCatalogData
(?
string
$catalogData)
180
{
181
$this->catalogData = $catalogData;
182
183
return
$this;
184
}
185
190
public
function
withVariant
(?
string
$variant)
191
{
192
$this->variant = $variant;
193
194
return
$this;
195
}
196
201
public
function
withAssetBuilder
(?
AssetChangeValueBuilder
$asset)
202
{
203
$this->asset = $asset;
204
205
return
$this;
206
}
207
208
public
function
build
():
SetAssetSourcesChange
209
{
210
return
new
SetAssetSourcesChangeModel
(
211
$this->change,
212
$this->previousValue,
213
$this->nextValue,
214
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset,
215
$this->catalogData,
216
$this->variant
217
);
218
}
219
220
public
static
function
of
():
SetAssetSourcesChangeBuilder
221
{
222
return
new
self
();
223
}
224
}
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\SetAssetSourcesChangeBuilder
Definition
SetAssetSourcesChangeBuilder.php:25
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getChange
getChange()
Definition
SetAssetSourcesChangeBuilder.php:66
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withNextValue
withNextValue(?AssetSourceCollection $nextValue)
Definition
SetAssetSourcesChangeBuilder.php:157
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getPreviousValue
getPreviousValue()
Definition
SetAssetSourcesChangeBuilder.php:77
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getNextValue
getNextValue()
Definition
SetAssetSourcesChangeBuilder.php:88
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withPreviousValue
withPreviousValue(?AssetSourceCollection $previousValue)
Definition
SetAssetSourcesChangeBuilder.php:146
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withChange
withChange(?string $change)
Definition
SetAssetSourcesChangeBuilder.php:135
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getCatalogData
getCatalogData()
Definition
SetAssetSourcesChangeBuilder.php:114
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withAsset
withAsset(?AssetChangeValue $asset)
Definition
SetAssetSourcesChangeBuilder.php:168
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withVariant
withVariant(?string $variant)
Definition
SetAssetSourcesChangeBuilder.php:190
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withCatalogData
withCatalogData(?string $catalogData)
Definition
SetAssetSourcesChangeBuilder.php:179
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getAsset
getAsset()
Definition
SetAssetSourcesChangeBuilder.php:99
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getVariant
getVariant()
Definition
SetAssetSourcesChangeBuilder.php:126
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withAssetBuilder
withAssetBuilder(?AssetChangeValueBuilder $asset)
Definition
SetAssetSourcesChangeBuilder.php:201
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\of
static of()
Definition
SetAssetSourcesChangeBuilder.php:220
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\build
build()
Definition
SetAssetSourcesChangeBuilder.php:208
Commercetools\History\Models\Change\SetAssetSourcesChangeModel
Definition
SetAssetSourcesChangeModel.php:24
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder
Definition
AssetChangeValueBuilder.php:24
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder\build
build()
Definition
AssetChangeValueBuilder.php:92
Commercetools\History\Models\Common\AssetSourceCollection
Definition
AssetSourceCollection.php:22
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Change\SetAssetSourcesChange
Definition
SetAssetSourcesChange.php:17
Commercetools\History\Models\ChangeValue\AssetChangeValue
Definition
AssetChangeValue.php:16
Commercetools\History\Models\Change
Definition
AddAddressChange.php:9
Generated by
1.9.8