commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
AttributeGroup
AttributeGroupBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\AttributeGroup
;
10
11
use
Commercetools\Api\Models\Common\BaseResource
;
12
use
Commercetools\Api\Models\Common\BaseResourceBuilder
;
13
use
Commercetools\Api\Models\Common\CreatedBy
;
14
use
Commercetools\Api\Models\Common\CreatedByBuilder
;
15
use
Commercetools\Api\Models\Common\LastModifiedBy
;
16
use
Commercetools\Api\Models\Common\LastModifiedByBuilder
;
17
use
Commercetools\Api\Models\Common\LocalizedString
;
18
use
Commercetools\Api\Models\Common\LocalizedStringBuilder
;
19
use
Commercetools\Base\Builder
;
20
use
Commercetools\Base\DateTimeImmutableCollection
;
21
use
Commercetools\Base\JsonObject
;
22
use
Commercetools\Base\JsonObjectModel
;
23
use
Commercetools\Base\MapperFactory
;
24
use DateTimeImmutable;
25
use stdClass;
26
30
final
class
AttributeGroupBuilder
implements
Builder
31
{
36
private
$id;
37
42
private
$version;
43
48
private
$createdAt;
49
54
private
$lastModifiedAt;
55
60
private
$lastModifiedBy;
61
66
private
$createdBy;
67
72
private
$name;
73
78
private
$description;
79
84
private
$attributes;
85
90
private
$key;
91
98
public
function
getId
()
99
{
100
return
$this->id;
101
}
102
109
public
function
getVersion
()
110
{
111
return
$this->version;
112
}
113
120
public
function
getCreatedAt
()
121
{
122
return
$this->createdAt;
123
}
124
131
public
function
getLastModifiedAt
()
132
{
133
return
$this->lastModifiedAt;
134
}
135
142
public
function
getLastModifiedBy
()
143
{
144
return
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy;
145
}
146
153
public
function
getCreatedBy
()
154
{
155
return
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy;
156
}
157
164
public
function
getName
()
165
{
166
return
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name;
167
}
168
175
public
function
getDescription
()
176
{
177
return
$this->description instanceof
LocalizedStringBuilder
? $this->description->
build
() : $this->description;
178
}
179
186
public
function
getAttributes
()
187
{
188
return
$this->attributes;
189
}
190
197
public
function
getKey
()
198
{
199
return
$this->key;
200
}
201
206
public
function
withId
(?
string
$id)
207
{
208
$this->
id
= $id;
209
210
return
$this;
211
}
212
217
public
function
withVersion
(?
int
$version)
218
{
219
$this->version = $version;
220
221
return
$this;
222
}
223
228
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
229
{
230
$this->createdAt = $createdAt;
231
232
return
$this;
233
}
234
239
public
function
withLastModifiedAt
(?DateTimeImmutable $lastModifiedAt)
240
{
241
$this->lastModifiedAt = $lastModifiedAt;
242
243
return
$this;
244
}
245
250
public
function
withLastModifiedBy
(?
LastModifiedBy
$lastModifiedBy)
251
{
252
$this->lastModifiedBy = $lastModifiedBy;
253
254
return
$this;
255
}
256
261
public
function
withCreatedBy
(?
CreatedBy
$createdBy)
262
{
263
$this->createdBy = $createdBy;
264
265
return
$this;
266
}
267
272
public
function
withName
(?
LocalizedString
$name)
273
{
274
$this->name = $name;
275
276
return
$this;
277
}
278
283
public
function
withDescription
(?
LocalizedString
$description)
284
{
285
$this->description = $description;
286
287
return
$this;
288
}
289
294
public
function
withAttributes
(?
AttributeReferenceCollection
$attributes)
295
{
296
$this->attributes = $attributes;
297
298
return
$this;
299
}
300
305
public
function
withKey
(?
string
$key)
306
{
307
$this->key = $key;
308
309
return
$this;
310
}
311
316
public
function
withLastModifiedByBuilder
(?
LastModifiedByBuilder
$lastModifiedBy)
317
{
318
$this->lastModifiedBy = $lastModifiedBy;
319
320
return
$this;
321
}
322
327
public
function
withCreatedByBuilder
(?
CreatedByBuilder
$createdBy)
328
{
329
$this->createdBy = $createdBy;
330
331
return
$this;
332
}
333
338
public
function
withNameBuilder
(?
LocalizedStringBuilder
$name)
339
{
340
$this->name = $name;
341
342
return
$this;
343
}
344
349
public
function
withDescriptionBuilder
(?
LocalizedStringBuilder
$description)
350
{
351
$this->description = $description;
352
353
return
$this;
354
}
355
356
public
function
build
():
AttributeGroup
357
{
358
return
new
AttributeGroupModel
(
359
$this->
id
,
360
$this->version,
361
$this->createdAt,
362
$this->lastModifiedAt,
363
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy,
364
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy,
365
$this->name instanceof
LocalizedStringBuilder
? $this->name->
build
() : $this->name,
366
$this->description instanceof
LocalizedStringBuilder
? $this->description->
build
() : $this->description,
367
$this->attributes,
368
$this->key
369
);
370
}
371
372
public
static
function
of
():
AttributeGroupBuilder
373
{
374
return
new
self
();
375
}
376
}
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder
Definition
AttributeGroupBuilder.php:31
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withId
withId(?string $id)
Definition
AttributeGroupBuilder.php:206
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\of
static of()
Definition
AttributeGroupBuilder.php:372
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withDescription
withDescription(?LocalizedString $description)
Definition
AttributeGroupBuilder.php:283
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getKey
getKey()
Definition
AttributeGroupBuilder.php:197
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withLastModifiedByBuilder
withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
Definition
AttributeGroupBuilder.php:316
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withLastModifiedBy
withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
Definition
AttributeGroupBuilder.php:250
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withKey
withKey(?string $key)
Definition
AttributeGroupBuilder.php:305
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getDescription
getDescription()
Definition
AttributeGroupBuilder.php:175
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getLastModifiedAt
getLastModifiedAt()
Definition
AttributeGroupBuilder.php:131
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
AttributeGroupBuilder.php:228
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\build
build()
Definition
AttributeGroupBuilder.php:356
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getVersion
getVersion()
Definition
AttributeGroupBuilder.php:109
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getLastModifiedBy
getLastModifiedBy()
Definition
AttributeGroupBuilder.php:142
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withLastModifiedAt
withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
Definition
AttributeGroupBuilder.php:239
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withVersion
withVersion(?int $version)
Definition
AttributeGroupBuilder.php:217
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getCreatedAt
getCreatedAt()
Definition
AttributeGroupBuilder.php:120
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withCreatedByBuilder
withCreatedByBuilder(?CreatedByBuilder $createdBy)
Definition
AttributeGroupBuilder.php:327
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getId
getId()
Definition
AttributeGroupBuilder.php:98
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withNameBuilder
withNameBuilder(?LocalizedStringBuilder $name)
Definition
AttributeGroupBuilder.php:338
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withCreatedBy
withCreatedBy(?CreatedBy $createdBy)
Definition
AttributeGroupBuilder.php:261
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withName
withName(?LocalizedString $name)
Definition
AttributeGroupBuilder.php:272
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getCreatedBy
getCreatedBy()
Definition
AttributeGroupBuilder.php:153
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withDescriptionBuilder
withDescriptionBuilder(?LocalizedStringBuilder $description)
Definition
AttributeGroupBuilder.php:349
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getAttributes
getAttributes()
Definition
AttributeGroupBuilder.php:186
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\withAttributes
withAttributes(?AttributeReferenceCollection $attributes)
Definition
AttributeGroupBuilder.php:294
Commercetools\Api\Models\AttributeGroup\AttributeGroupBuilder\getName
getName()
Definition
AttributeGroupBuilder.php:164
Commercetools\Api\Models\AttributeGroup\AttributeGroupModel
Definition
AttributeGroupModel.php:30
Commercetools\Api\Models\AttributeGroup\AttributeReferenceCollection
Definition
AttributeReferenceCollection.php:22
Commercetools\Api\Models\Common\BaseResourceBuilder
Definition
BaseResourceBuilder.php:491
Commercetools\Api\Models\Common\CreatedByBuilder
Definition
CreatedByBuilder.php:24
Commercetools\Api\Models\Common\CreatedByBuilder\build
build()
Definition
CreatedByBuilder.php:226
Commercetools\Api\Models\Common\LastModifiedByBuilder
Definition
LastModifiedByBuilder.php:24
Commercetools\Api\Models\Common\LastModifiedByBuilder\build
build()
Definition
LastModifiedByBuilder.php:226
Commercetools\Api\Models\Common\LocalizedStringBuilder
Definition
LocalizedStringBuilder.php:20
Commercetools\Api\Models\Common\LocalizedStringBuilder\build
build()
Definition
LocalizedStringBuilder.php:42
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\AttributeGroup\AttributeGroup
Definition
AttributeGroup.php:20
Commercetools\Api\Models\Common\BaseResource
Definition
BaseResource.php:250
Commercetools\Api\Models\Common\CreatedBy
Definition
CreatedBy.php:16
Commercetools\Api\Models\Common\LastModifiedBy
Definition
LastModifiedBy.php:16
Commercetools\Api\Models\Common\LocalizedString
Definition
LocalizedString.php:14
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\AttributeGroup
Definition
AttributeGroup.php:9
Generated by
1.9.8