commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Change
SetAssetCustomFieldChangeBuilder.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
23
final
class
SetAssetCustomFieldChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$previousValue;
36
41
private
$nextValue;
42
47
private
$name;
48
53
private
$customTypeId;
54
59
private
$asset;
60
65
public
function
getChange
()
66
{
67
return
$this->change;
68
}
69
76
public
function
getPreviousValue
()
77
{
78
return
$this->previousValue;
79
}
80
87
public
function
getNextValue
()
88
{
89
return
$this->nextValue;
90
}
91
98
public
function
getName
()
99
{
100
return
$this->name;
101
}
102
109
public
function
getCustomTypeId
()
110
{
111
return
$this->customTypeId;
112
}
113
120
public
function
getAsset
()
121
{
122
return
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset;
123
}
124
129
public
function
withChange
(?
string
$change)
130
{
131
$this->change = $change;
132
133
return
$this;
134
}
135
140
public
function
withPreviousValue
( $previousValue)
141
{
142
$this->previousValue = $previousValue;
143
144
return
$this;
145
}
146
151
public
function
withNextValue
( $nextValue)
152
{
153
$this->nextValue = $nextValue;
154
155
return
$this;
156
}
157
162
public
function
withName
(?
string
$name)
163
{
164
$this->name = $name;
165
166
return
$this;
167
}
168
173
public
function
withCustomTypeId
(?
string
$customTypeId)
174
{
175
$this->customTypeId = $customTypeId;
176
177
return
$this;
178
}
179
184
public
function
withAsset
(?
AssetChangeValue
$asset)
185
{
186
$this->asset = $asset;
187
188
return
$this;
189
}
190
195
public
function
withAssetBuilder
(?
AssetChangeValueBuilder
$asset)
196
{
197
$this->asset = $asset;
198
199
return
$this;
200
}
201
202
public
function
build
():
SetAssetCustomFieldChange
203
{
204
return
new
SetAssetCustomFieldChangeModel
(
205
$this->change,
206
$this->previousValue,
207
$this->nextValue,
208
$this->name,
209
$this->customTypeId,
210
$this->asset instanceof
AssetChangeValueBuilder
? $this->asset->
build
() : $this->asset
211
);
212
}
213
214
public
static
function
of
():
SetAssetCustomFieldChangeBuilder
215
{
216
return
new
self
();
217
}
218
}
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\SetAssetCustomFieldChangeBuilder
Definition:
SetAssetCustomFieldChangeBuilder.php:24
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\withName
withName(?string $name)
Definition:
SetAssetCustomFieldChangeBuilder.php:162
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\withCustomTypeId
withCustomTypeId(?string $customTypeId)
Definition:
SetAssetCustomFieldChangeBuilder.php:173
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\getChange
getChange()
Definition:
SetAssetCustomFieldChangeBuilder.php:65
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\getAsset
getAsset()
Definition:
SetAssetCustomFieldChangeBuilder.php:120
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\of
static of()
Definition:
SetAssetCustomFieldChangeBuilder.php:214
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\withAsset
withAsset(?AssetChangeValue $asset)
Definition:
SetAssetCustomFieldChangeBuilder.php:184
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\withChange
withChange(?string $change)
Definition:
SetAssetCustomFieldChangeBuilder.php:129
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\getName
getName()
Definition:
SetAssetCustomFieldChangeBuilder.php:98
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\getCustomTypeId
getCustomTypeId()
Definition:
SetAssetCustomFieldChangeBuilder.php:109
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\getPreviousValue
getPreviousValue()
Definition:
SetAssetCustomFieldChangeBuilder.php:76
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\withNextValue
withNextValue( $nextValue)
Definition:
SetAssetCustomFieldChangeBuilder.php:151
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\getNextValue
getNextValue()
Definition:
SetAssetCustomFieldChangeBuilder.php:87
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\withAssetBuilder
withAssetBuilder(?AssetChangeValueBuilder $asset)
Definition:
SetAssetCustomFieldChangeBuilder.php:195
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\withPreviousValue
withPreviousValue( $previousValue)
Definition:
SetAssetCustomFieldChangeBuilder.php:140
Commercetools\History\Models\Change\SetAssetCustomFieldChangeBuilder\build
build()
Definition:
SetAssetCustomFieldChangeBuilder.php:202
Commercetools\History\Models\Change\SetAssetCustomFieldChangeModel
Definition:
SetAssetCustomFieldChangeModel.php:23
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder
Definition:
AssetChangeValueBuilder.php:24
Commercetools\History\Models\ChangeValue\AssetChangeValueBuilder\build
build()
Definition:
AssetChangeValueBuilder.php:92
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Change\SetAssetCustomFieldChange
Definition:
SetAssetCustomFieldChange.php:16
Commercetools\History\Models\ChangeValue\AssetChangeValue
Definition:
AssetChangeValue.php:16
Commercetools\History\Models\Change
Definition:
AddAddressChange.php:9
Generated by
1.9.1