commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
VariantAttributesAttributeMetadataBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
24{
29 private $name;
30
35 private $label;
36
41 private $type;
42
49 public function getName()
50 {
51 return $this->name;
52 }
53
61 public function getLabel()
62 {
63 return $this->label instanceof LocalizedStringBuilder ? $this->label->build() : $this->label;
64 }
65
72 public function getType()
73 {
74 return $this->type;
75 }
76
81 public function withName(?string $name)
82 {
83 $this->name = $name;
84
85 return $this;
86 }
87
92 public function withLabel(?LocalizedString $label)
93 {
94 $this->label = $label;
95
96 return $this;
97 }
98
103 public function withType(?string $type)
104 {
105 $this->type = $type;
106
107 return $this;
108 }
109
115 {
116 $this->label = $label;
117
118 return $this;
119 }
120
122 {
124 $this->name,
125 $this->label instanceof LocalizedStringBuilder ? $this->label->build() : $this->label,
126 $this->type
127 );
128 }
129
131 {
132 return new self();
133 }
134}