commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Change
AddLocalizedEnumValueChangeBuilder.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\Common\AttributeLocalizedEnumValue
;
18
use
Commercetools\History\Models\Common\AttributeLocalizedEnumValueBuilder
;
19
23
final
class
AddLocalizedEnumValueChangeBuilder
implements
Builder
24
{
29
private
$change;
30
35
private
$nextValue;
36
41
private
$fieldName;
42
47
private
$attributeName;
48
53
public
function
getChange
()
54
{
55
return
$this->change;
56
}
57
64
public
function
getNextValue
()
65
{
66
return
$this->nextValue instanceof
AttributeLocalizedEnumValueBuilder
? $this->nextValue->
build
() : $this->nextValue;
67
}
68
75
public
function
getFieldName
()
76
{
77
return
$this->fieldName;
78
}
79
86
public
function
getAttributeName
()
87
{
88
return
$this->attributeName;
89
}
90
95
public
function
withChange
(?
string
$change)
96
{
97
$this->change = $change;
98
99
return
$this;
100
}
101
106
public
function
withNextValue
(?
AttributeLocalizedEnumValue
$nextValue)
107
{
108
$this->nextValue = $nextValue;
109
110
return
$this;
111
}
112
117
public
function
withFieldName
(?
string
$fieldName)
118
{
119
$this->fieldName = $fieldName;
120
121
return
$this;
122
}
123
128
public
function
withAttributeName
(?
string
$attributeName)
129
{
130
$this->attributeName = $attributeName;
131
132
return
$this;
133
}
134
139
public
function
withNextValueBuilder
(?
AttributeLocalizedEnumValueBuilder
$nextValue)
140
{
141
$this->nextValue = $nextValue;
142
143
return
$this;
144
}
145
146
public
function
build
():
AddLocalizedEnumValueChange
147
{
148
return
new
AddLocalizedEnumValueChangeModel
(
149
$this->change,
150
$this->nextValue instanceof
AttributeLocalizedEnumValueBuilder
? $this->nextValue->
build
() : $this->nextValue,
151
$this->fieldName,
152
$this->attributeName
153
);
154
}
155
156
public
static
function
of
():
AddLocalizedEnumValueChangeBuilder
157
{
158
return
new
self
();
159
}
160
}
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\AddLocalizedEnumValueChangeBuilder
Definition:
AddLocalizedEnumValueChangeBuilder.php:24
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\withChange
withChange(?string $change)
Definition:
AddLocalizedEnumValueChangeBuilder.php:95
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\of
static of()
Definition:
AddLocalizedEnumValueChangeBuilder.php:156
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\getAttributeName
getAttributeName()
Definition:
AddLocalizedEnumValueChangeBuilder.php:86
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\withFieldName
withFieldName(?string $fieldName)
Definition:
AddLocalizedEnumValueChangeBuilder.php:117
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\withAttributeName
withAttributeName(?string $attributeName)
Definition:
AddLocalizedEnumValueChangeBuilder.php:128
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\getChange
getChange()
Definition:
AddLocalizedEnumValueChangeBuilder.php:53
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\withNextValueBuilder
withNextValueBuilder(?AttributeLocalizedEnumValueBuilder $nextValue)
Definition:
AddLocalizedEnumValueChangeBuilder.php:139
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\getFieldName
getFieldName()
Definition:
AddLocalizedEnumValueChangeBuilder.php:75
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\withNextValue
withNextValue(?AttributeLocalizedEnumValue $nextValue)
Definition:
AddLocalizedEnumValueChangeBuilder.php:106
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\build
build()
Definition:
AddLocalizedEnumValueChangeBuilder.php:146
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeBuilder\getNextValue
getNextValue()
Definition:
AddLocalizedEnumValueChangeBuilder.php:64
Commercetools\History\Models\Change\AddLocalizedEnumValueChangeModel
Definition:
AddLocalizedEnumValueChangeModel.php:23
Commercetools\History\Models\Common\AttributeLocalizedEnumValueBuilder
Definition:
AttributeLocalizedEnumValueBuilder.php:22
Commercetools\History\Models\Common\AttributeLocalizedEnumValueBuilder\build
build()
Definition:
AttributeLocalizedEnumValueBuilder.php:90
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Change\AddLocalizedEnumValueChange
Definition:
AddLocalizedEnumValueChange.php:16
Commercetools\History\Models\Common\AttributeLocalizedEnumValue
Definition:
AttributeLocalizedEnumValue.php:15
Commercetools\History\Models\Change
Definition:
AddAddressChange.php:9
Generated by
1.9.1