commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
ProductTypeImportBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
18 use stdClass;
19 
23 final class ProductTypeImportBuilder implements Builder
24 {
29  private $key;
30 
35  private $name;
36 
41  private $description;
42 
47  private $attributes;
48 
55  public function getKey()
56  {
57  return $this->key;
58  }
59 
66  public function getName()
67  {
68  return $this->name;
69  }
70 
77  public function getDescription()
78  {
79  return $this->description;
80  }
81 
88  public function getAttributes()
89  {
90  return $this->attributes;
91  }
92 
97  public function withKey(?string $key)
98  {
99  $this->key = $key;
100 
101  return $this;
102  }
103 
108  public function withName(?string $name)
109  {
110  $this->name = $name;
111 
112  return $this;
113  }
114 
119  public function withDescription(?string $description)
120  {
121  $this->description = $description;
122 
123  return $this;
124  }
125 
130  public function withAttributes(?AttributeDefinitionCollection $attributes)
131  {
132  $this->attributes = $attributes;
133 
134  return $this;
135  }
136 
137 
138  public function build(): ProductTypeImport
139  {
140  return new ProductTypeImportModel(
141  $this->key,
142  $this->name,
143  $this->description,
144  $this->attributes
145  );
146  }
147 
148  public static function of(): ProductTypeImportBuilder
149  {
150  return new self();
151  }
152 }