commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ConfluentCloudDestinationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'ConfluentCloud';
27 protected $type;
28
34
39 protected $apiKey;
40
45 protected $apiSecret;
46
51 protected $acks;
52
57 protected $topic;
58
63 protected $key;
64
65
69 public function __construct(
70 ?string $bootstrapServer = null,
71 ?string $apiKey = null,
72 ?string $apiSecret = null,
73 ?string $acks = null,
74 ?string $topic = null,
75 ?string $key = null,
76 ?string $type = null
77 ) {
78 $this->bootstrapServer = $bootstrapServer;
79 $this->apiKey = $apiKey;
80 $this->apiSecret = $apiSecret;
81 $this->acks = $acks;
82 $this->topic = $topic;
83 $this->key = $key;
84 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
85 }
86
91 public function getType()
92 {
93 if (is_null($this->type)) {
95 $data = $this->raw(self::FIELD_TYPE);
96 if (is_null($data)) {
97 return null;
98 }
99 $this->type = (string) $data;
100 }
101
102 return $this->type;
103 }
104
111 public function getBootstrapServer()
112 {
113 if (is_null($this->bootstrapServer)) {
115 $data = $this->raw(self::FIELD_BOOTSTRAP_SERVER);
116 if (is_null($data)) {
117 return null;
118 }
119 $this->bootstrapServer = (string) $data;
120 }
121
123 }
124
131 public function getApiKey()
132 {
133 if (is_null($this->apiKey)) {
135 $data = $this->raw(self::FIELD_API_KEY);
136 if (is_null($data)) {
137 return null;
138 }
139 $this->apiKey = (string) $data;
140 }
141
142 return $this->apiKey;
143 }
144
151 public function getApiSecret()
152 {
153 if (is_null($this->apiSecret)) {
155 $data = $this->raw(self::FIELD_API_SECRET);
156 if (is_null($data)) {
157 return null;
158 }
159 $this->apiSecret = (string) $data;
160 }
161
162 return $this->apiSecret;
163 }
164
171 public function getAcks()
172 {
173 if (is_null($this->acks)) {
175 $data = $this->raw(self::FIELD_ACKS);
176 if (is_null($data)) {
177 return null;
178 }
179 $this->acks = (string) $data;
180 }
181
182 return $this->acks;
183 }
184
191 public function getTopic()
192 {
193 if (is_null($this->topic)) {
195 $data = $this->raw(self::FIELD_TOPIC);
196 if (is_null($data)) {
197 return null;
198 }
199 $this->topic = (string) $data;
200 }
201
202 return $this->topic;
203 }
204
211 public function getKey()
212 {
213 if (is_null($this->key)) {
215 $data = $this->raw(self::FIELD_KEY);
216 if (is_null($data)) {
217 return null;
218 }
219 $this->key = (string) $data;
220 }
221
222 return $this->key;
223 }
224
225
229 public function setBootstrapServer(?string $bootstrapServer): void
230 {
231 $this->bootstrapServer = $bootstrapServer;
232 }
233
237 public function setApiKey(?string $apiKey): void
238 {
239 $this->apiKey = $apiKey;
240 }
241
245 public function setApiSecret(?string $apiSecret): void
246 {
247 $this->apiSecret = $apiSecret;
248 }
249
253 public function setAcks(?string $acks): void
254 {
255 $this->acks = $acks;
256 }
257
261 public function setTopic(?string $topic): void
262 {
263 $this->topic = $topic;
264 }
265
269 public function setKey(?string $key): void
270 {
271 $this->key = $key;
272 }
273}
__construct(?string $bootstrapServer=null, ?string $apiKey=null, ?string $apiSecret=null, ?string $acks=null, ?string $topic=null, ?string $key=null, ?string $type=null)