commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
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
public
function
getChange
()
55
{
56
return
$this->change;
57
}
58
65
public
function
getPreviousValue
()
66
{
67
return
$this->previousValue;
68
}
69
76
public
function
getNextValue
()
77
{
78
return
$this->nextValue;
79
}
80
87
public
function
getAsset
()
88
{
89
return
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset;
90
}
91
96
public
function
withChange
(?
string
$change)
97
{
98
$this->change = $change;
99
100
return
$this;
101
}
102
107
public
function
withPreviousValue
(?
AssetSourceCollection
$previousValue)
108
{
109
$this->previousValue = $previousValue;
110
111
return
$this;
112
}
113
118
public
function
withNextValue
(?
AssetSourceCollection
$nextValue)
119
{
120
$this->nextValue = $nextValue;
121
122
return
$this;
123
}
124
129
public
function
withAsset
(?
AssetChangeValue
$asset)
130
{
131
$this->asset = $asset;
132
133
return
$this;
134
}
135
140
public
function
withAssetBuilder
(?
AssetChangeValueBuilder
$asset)
141
{
142
$this->asset = $asset;
143
144
return
$this;
145
}
146
147
public
function
build
():
SetAssetSourcesChange
148
{
149
return
new
SetAssetSourcesChangeModel
(
150
$this->change,
151
$this->previousValue,
152
$this->nextValue,
153
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset
154
);
155
}
156
157
public
static
function
of
():
SetAssetSourcesChangeBuilder
158
{
159
return
new
self
();
160
}
161
}
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:54
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withNextValue
withNextValue(?AssetSourceCollection $nextValue)
Definition:
SetAssetSourcesChangeBuilder.php:118
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getPreviousValue
getPreviousValue()
Definition:
SetAssetSourcesChangeBuilder.php:65
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getNextValue
getNextValue()
Definition:
SetAssetSourcesChangeBuilder.php:76
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withPreviousValue
withPreviousValue(?AssetSourceCollection $previousValue)
Definition:
SetAssetSourcesChangeBuilder.php:107
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withChange
withChange(?string $change)
Definition:
SetAssetSourcesChangeBuilder.php:96
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withAsset
withAsset(?AssetChangeValue $asset)
Definition:
SetAssetSourcesChangeBuilder.php:129
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\getAsset
getAsset()
Definition:
SetAssetSourcesChangeBuilder.php:87
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\withAssetBuilder
withAssetBuilder(?AssetChangeValueBuilder $asset)
Definition:
SetAssetSourcesChangeBuilder.php:140
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\of
static of()
Definition:
SetAssetSourcesChangeBuilder.php:157
Commercetools\History\Models\Change\SetAssetSourcesChangeBuilder\build
build()
Definition:
SetAssetSourcesChangeBuilder.php:147
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.1