commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
VariantBulkUpdateSuccessResultModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'Success';
27 protected $id;
28
33 protected $key;
34
39 protected $status;
40
45 protected $resource;
46
47
51 public function __construct(
52 ?string $id = null,
53 ?string $key = null,
55 ?string $status = null
56 ) {
57 $this->id = $id;
58 $this->key = $key;
59 $this->resource = $resource;
60 $this->status = $status ?? self::DISCRIMINATOR_VALUE;
61 }
62
69 public function getId()
70 {
71 if (is_null($this->id)) {
73 $data = $this->raw(self::FIELD_ID);
74 if (is_null($data)) {
75 return null;
76 }
77 $this->id = (string) $data;
78 }
79
80 return $this->id;
81 }
82
89 public function getKey()
90 {
91 if (is_null($this->key)) {
93 $data = $this->raw(self::FIELD_KEY);
94 if (is_null($data)) {
95 return null;
96 }
97 $this->key = (string) $data;
98 }
99
100 return $this->key;
101 }
102
109 public function getStatus()
110 {
111 if (is_null($this->status)) {
113 $data = $this->raw(self::FIELD_STATUS);
114 if (is_null($data)) {
115 return null;
116 }
117 $this->status = (string) $data;
118 }
119
120 return $this->status;
121 }
122
129 public function getResource()
130 {
131 if (is_null($this->resource)) {
133 $data = $this->raw(self::FIELD_RESOURCE);
134 if (is_null($data)) {
135 return null;
136 }
137
138 $this->resource = VariantBulkUpdateResourceModel::of($data);
139 }
140
141 return $this->resource;
142 }
143
144
148 public function setId(?string $id): void
149 {
150 $this->id = $id;
151 }
152
156 public function setKey(?string $key): void
157 {
158 $this->key = $key;
159 }
160
165 {
166 $this->resource = $resource;
167 }
168}
__construct(?string $id=null, ?string $key=null, ?VariantBulkUpdateResource $resource=null, ?string $status=null)