commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ParameterOverrideModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $name;
27
32 protected $description;
33
38 protected $const;
39
44 protected $default;
45
50 protected $allowedTypes;
51
52
56 public function __construct(
57 ?string $name = null,
58 ?string $description = null,
59 $const = null,
60 $default = null,
61 ?array $allowedTypes = null
62 ) {
63 $this->name = $name;
64 $this->description = $description;
65 $this->const = $const;
66 $this->default = $default;
67 $this->allowedTypes = $allowedTypes;
68 }
69
76 public function getName()
77 {
78 if (is_null($this->name)) {
80 $data = $this->raw(self::FIELD_NAME);
81 if (is_null($data)) {
82 return null;
83 }
84 $this->name = (string) $data;
85 }
86
87 return $this->name;
88 }
89
96 public function getDescription()
97 {
98 if (is_null($this->description)) {
100 $data = $this->raw(self::FIELD_DESCRIPTION);
101 if (is_null($data)) {
102 return null;
103 }
104 $this->description = (string) $data;
105 }
106
107 return $this->description;
108 }
109
116 public function getConst()
117 {
118 if (is_null($this->const)) {
120 $data = $this->raw(self::FIELD_CONST);
121 if (is_null($data)) {
122 return null;
123 }
124 $this->const = $data;
125 }
126
127 return $this->const;
128 }
129
136 public function getDefault()
137 {
138 if (is_null($this->default)) {
140 $data = $this->raw(self::FIELD_DEFAULT);
141 if (is_null($data)) {
142 return null;
143 }
144 $this->default = $data;
145 }
146
147 return $this->default;
148 }
149
156 public function getAllowedTypes()
157 {
158 if (is_null($this->allowedTypes)) {
160 $data = $this->raw(self::FIELD_ALLOWED_TYPES);
161 if (is_null($data)) {
162 return null;
163 }
164 $this->allowedTypes = $data;
165 }
166
167 return $this->allowedTypes;
168 }
169
170
174 public function setName(?string $name): void
175 {
176 $this->name = $name;
177 }
178
182 public function setDescription(?string $description): void
183 {
184 $this->description = $description;
185 }
186
190 public function setConst($const): void
191 {
192 $this->const = $const;
193 }
194
198 public function setDefault($default): void
199 {
200 $this->default = $default;
201 }
202
206 public function setAllowedTypes(?array $allowedTypes): void
207 {
208 $this->allowedTypes = $allowedTypes;
209 }
210}
__construct(?string $name=null, ?string $description=null, $const=null, $default=null, ?array $allowedTypes=null)