commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Productvariants
LocalizableEnumAttributeModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Productvariants
;
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
20
final
class
LocalizableEnumAttributeModel
extends
JsonObjectModel
implements
LocalizableEnumAttribute
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'lenum'
;
27
protected
$name
;
28
33
protected
$type
;
34
39
protected
$value
;
40
41
45
public
function
__construct
(
46
?
string
$name
=
null
,
47
?
string
$value
=
null
,
48
?
string
$type
=
null
49
) {
50
$this->name =
$name
;
51
$this->value =
$value
;
52
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
53
}
54
63
public
function
getName
()
64
{
65
if
(is_null($this->name)) {
67
$data = $this->
raw
(self::FIELD_NAME);
68
if
(is_null($data)) {
69
return
null
;
70
}
71
$this->name = (string) $data;
72
}
73
74
return
$this->name
;
75
}
76
81
public
function
getType
()
82
{
83
if
(is_null($this->type)) {
85
$data = $this->
raw
(self::FIELD_TYPE);
86
if
(is_null($data)) {
87
return
null
;
88
}
89
$this->type = (string) $data;
90
}
91
92
return
$this->type
;
93
}
94
99
public
function
getValue
()
100
{
101
if
(is_null($this->value)) {
103
$data = $this->
raw
(self::FIELD_VALUE);
104
if
(is_null($data)) {
105
return
null
;
106
}
107
$this->value = (string) $data;
108
}
109
110
return
$this->value
;
111
}
112
113
117
public
function
setName
(?
string
$name
): void
118
{
119
$this->name =
$name
;
120
}
121
125
public
function
setValue
(?
string
$value
): void
126
{
127
$this->value =
$value
;
128
}
129
}
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\Import\Models\Productvariants\LocalizableEnumAttributeModel
Definition:
LocalizableEnumAttributeModel.php:21
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\setName
setName(?string $name)
Definition:
LocalizableEnumAttributeModel.php:117
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
LocalizableEnumAttributeModel.php:22
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\$value
$value
Definition:
LocalizableEnumAttributeModel.php:39
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\$name
$name
Definition:
LocalizableEnumAttributeModel.php:27
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\__construct
__construct(?string $name=null, ?string $value=null, ?string $type=null)
Definition:
LocalizableEnumAttributeModel.php:45
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\getName
getName()
Definition:
LocalizableEnumAttributeModel.php:63
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\getValue
getValue()
Definition:
LocalizableEnumAttributeModel.php:99
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\$type
$type
Definition:
LocalizableEnumAttributeModel.php:33
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\setValue
setValue(?string $value)
Definition:
LocalizableEnumAttributeModel.php:125
Commercetools\Import\Models\Productvariants\LocalizableEnumAttributeModel\getType
getType()
Definition:
LocalizableEnumAttributeModel.php:81
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Productvariants\LocalizableEnumAttribute
Definition:
LocalizableEnumAttribute.php:15
Commercetools\Import\Models\Productvariants
Definition:
Attribute.php:9
Generated by
1.9.1