commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ImportContainerDraftModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $key;
27
32 protected $resourceType;
33
34
38 public function __construct(
39 ?string $key = null,
40 ?string $resourceType = null
41 ) {
42 $this->key = $key;
43 $this->resourceType = $resourceType;
44 }
45
53 public function getKey()
54 {
55 if (is_null($this->key)) {
57 $data = $this->raw(self::FIELD_KEY);
58 if (is_null($data)) {
59 return null;
60 }
61 $this->key = (string) $data;
62 }
63
64 return $this->key;
65 }
66
74 public function getResourceType()
75 {
76 if (is_null($this->resourceType)) {
78 $data = $this->raw(self::FIELD_RESOURCE_TYPE);
79 if (is_null($data)) {
80 return null;
81 }
82 $this->resourceType = (string) $data;
83 }
84
86 }
87
88
92 public function setKey(?string $key): void
93 {
94 $this->key = $key;
95 }
96
100 public function setResourceType(?string $resourceType): void
101 {
102 $this->resourceType = $resourceType;
103 }
104}