commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Label
BusinessUnitLabelModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Label
;
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
BusinessUnitLabelModel
extends
JsonObjectModel
implements
BusinessUnitLabel
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'BusinessUnitLabel'
;
28
protected
$type
;
29
34
protected
$key
;
35
40
protected
$name
;
41
42
46
public
function
__construct
(
47
?
string
$key
=
null
,
48
?
string
$name
=
null
,
49
?
string
$type
=
null
50
) {
51
$this->key =
$key
;
52
$this->name =
$name
;
53
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
54
}
55
60
public
function
getType
()
61
{
62
if
(is_null($this->type)) {
64
$data = $this->
raw
(self::FIELD_TYPE);
65
if
(is_null($data)) {
66
return
null
;
67
}
68
$this->type = (string) $data;
69
}
70
71
return
$this->type
;
72
}
73
80
public
function
getKey
()
81
{
82
if
(is_null($this->key)) {
84
$data = $this->
raw
(self::FIELD_KEY);
85
if
(is_null($data)) {
86
return
null
;
87
}
88
$this->key = (string) $data;
89
}
90
91
return
$this->key
;
92
}
93
100
public
function
getName
()
101
{
102
if
(is_null($this->name)) {
104
$data = $this->
raw
(self::FIELD_NAME);
105
if
(is_null($data)) {
106
return
null
;
107
}
108
$this->name = (string) $data;
109
}
110
111
return
$this->name
;
112
}
113
114
118
public
function
setKey
(?
string
$key
): void
119
{
120
$this->key =
$key
;
121
}
122
126
public
function
setName
(?
string
$name
): void
127
{
128
$this->name =
$name
;
129
}
130
131
132
133
}
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\History\Models\Label\BusinessUnitLabelModel
Definition:
BusinessUnitLabelModel.php:21
Commercetools\History\Models\Label\BusinessUnitLabelModel\$name
$name
Definition:
BusinessUnitLabelModel.php:40
Commercetools\History\Models\Label\BusinessUnitLabelModel\setName
setName(?string $name)
Definition:
BusinessUnitLabelModel.php:126
Commercetools\History\Models\Label\BusinessUnitLabelModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
BusinessUnitLabelModel.php:23
Commercetools\History\Models\Label\BusinessUnitLabelModel\getKey
getKey()
Definition:
BusinessUnitLabelModel.php:80
Commercetools\History\Models\Label\BusinessUnitLabelModel\$key
$key
Definition:
BusinessUnitLabelModel.php:34
Commercetools\History\Models\Label\BusinessUnitLabelModel\getType
getType()
Definition:
BusinessUnitLabelModel.php:60
Commercetools\History\Models\Label\BusinessUnitLabelModel\getName
getName()
Definition:
BusinessUnitLabelModel.php:100
Commercetools\History\Models\Label\BusinessUnitLabelModel\setKey
setKey(?string $key)
Definition:
BusinessUnitLabelModel.php:118
Commercetools\History\Models\Label\BusinessUnitLabelModel\__construct
__construct(?string $key=null, ?string $name=null, ?string $type=null)
Definition:
BusinessUnitLabelModel.php:46
Commercetools\History\Models\Label\BusinessUnitLabelModel\$type
$type
Definition:
BusinessUnitLabelModel.php:28
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Label\BusinessUnitLabel
Definition:
BusinessUnitLabel.php:15
Commercetools\History\Models\Label
Definition:
AssociateRoleLabel.php:9
Generated by
1.9.1