commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
VariantRemoveImageActionModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'removeImage';
27 protected $action;
28
33 protected $imageUrl;
34
39 protected $staged;
40
41
45 public function __construct(
46 ?string $imageUrl = null,
47 ?bool $staged = null,
48 ?string $action = null
49 ) {
50 $this->imageUrl = $imageUrl;
51 $this->staged = $staged;
52 $this->action = $action ?? self::DISCRIMINATOR_VALUE;
53 }
54
59 public function getAction()
60 {
61 if (is_null($this->action)) {
63 $data = $this->raw(self::FIELD_ACTION);
64 if (is_null($data)) {
65 return null;
66 }
67 $this->action = (string) $data;
68 }
69
70 return $this->action;
71 }
72
79 public function getImageUrl()
80 {
81 if (is_null($this->imageUrl)) {
83 $data = $this->raw(self::FIELD_IMAGE_URL);
84 if (is_null($data)) {
85 return null;
86 }
87 $this->imageUrl = (string) $data;
88 }
89
90 return $this->imageUrl;
91 }
92
99 public function getStaged()
100 {
101 if (is_null($this->staged)) {
103 $data = $this->raw(self::FIELD_STAGED);
104 if (is_null($data)) {
105 return null;
106 }
107 $this->staged = (bool) $data;
108 }
109
110 return $this->staged;
111 }
112
113
117 public function setImageUrl(?string $imageUrl): void
118 {
119 $this->imageUrl = $imageUrl;
120 }
121
125 public function setStaged(?bool $staged): void
126 {
127 $this->staged = $staged;
128 }
129}
__construct(?string $imageUrl=null, ?bool $staged=null, ?string $action=null)