commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
VariantImageAddedMessagePayloadBuilder.php
1<?php
2
3declare(strict_types=1);
10
20use stdClass;
21
26{
31 private $product;
32
37 private $image;
38
43 private $staged;
44
51 public function getProduct()
52 {
53 return $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product;
54 }
55
62 public function getImage()
63 {
64 return $this->image instanceof ImageBuilder ? $this->image->build() : $this->image;
65 }
66
73 public function getStaged()
74 {
75 return $this->staged;
76 }
77
82 public function withProduct(?ProductReference $product)
83 {
84 $this->product = $product;
85
86 return $this;
87 }
88
93 public function withImage(?Image $image)
94 {
95 $this->image = $image;
96
97 return $this;
98 }
99
104 public function withStaged(?bool $staged)
105 {
106 $this->staged = $staged;
107
108 return $this;
109 }
110
116 {
117 $this->product = $product;
118
119 return $this;
120 }
121
126 public function withImageBuilder(?ImageBuilder $image)
127 {
128 $this->image = $image;
129
130 return $this;
131 }
132
134 {
136 $this->product instanceof ProductReferenceBuilder ? $this->product->build() : $this->product,
137 $this->image instanceof ImageBuilder ? $this->image->build() : $this->image,
138 $this->staged
139 );
140 }
141
143 {
144 return new self();
145 }
146}