commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
ImportContainerDraftBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class ImportContainerDraftBuilder implements Builder
22 {
27  private $key;
28 
33  private $resourceType;
34 
42  public function getKey()
43  {
44  return $this->key;
45  }
46 
54  public function getResourceType()
55  {
56  return $this->resourceType;
57  }
58 
63  public function withKey(?string $key)
64  {
65  $this->key = $key;
66 
67  return $this;
68  }
69 
74  public function withResourceType(?string $resourceType)
75  {
76  $this->resourceType = $resourceType;
77 
78  return $this;
79  }
80 
81 
82  public function build(): ImportContainerDraft
83  {
84  return new ImportContainerDraftModel(
85  $this->key,
86  $this->resourceType
87  );
88  }
89 
90  public static function of(): ImportContainerDraftBuilder
91  {
92  return new self();
93  }
94 }