commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SqsDestinationModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
20 final class SqsDestinationModel extends JsonObjectModel implements SqsDestination
21 {
22  public const DISCRIMINATOR_VALUE = 'SQS';
27  protected $type;
28 
33  protected $accessKey;
34 
39  protected $accessSecret;
40 
45  protected $queueUrl;
46 
51  protected $region;
52 
58 
59 
63  public function __construct(
64  ?string $accessKey = null,
65  ?string $accessSecret = null,
66  ?string $queueUrl = null,
67  ?string $region = null,
68  ?string $authenticationMode = null,
69  ?string $type = null
70  ) {
71  $this->accessKey = $accessKey;
72  $this->accessSecret = $accessSecret;
73  $this->queueUrl = $queueUrl;
74  $this->region = $region;
75  $this->authenticationMode = $authenticationMode;
76  $this->type = $type ?? self::DISCRIMINATOR_VALUE;
77  }
78 
83  public function getType()
84  {
85  if (is_null($this->type)) {
87  $data = $this->raw(self::FIELD_TYPE);
88  if (is_null($data)) {
89  return null;
90  }
91  $this->type = (string) $data;
92  }
93 
94  return $this->type;
95  }
96 
103  public function getAccessKey()
104  {
105  if (is_null($this->accessKey)) {
107  $data = $this->raw(self::FIELD_ACCESS_KEY);
108  if (is_null($data)) {
109  return null;
110  }
111  $this->accessKey = (string) $data;
112  }
113 
114  return $this->accessKey;
115  }
116 
123  public function getAccessSecret()
124  {
125  if (is_null($this->accessSecret)) {
127  $data = $this->raw(self::FIELD_ACCESS_SECRET);
128  if (is_null($data)) {
129  return null;
130  }
131  $this->accessSecret = (string) $data;
132  }
133 
134  return $this->accessSecret;
135  }
136 
143  public function getQueueUrl()
144  {
145  if (is_null($this->queueUrl)) {
147  $data = $this->raw(self::FIELD_QUEUE_URL);
148  if (is_null($data)) {
149  return null;
150  }
151  $this->queueUrl = (string) $data;
152  }
153 
154  return $this->queueUrl;
155  }
156 
163  public function getRegion()
164  {
165  if (is_null($this->region)) {
167  $data = $this->raw(self::FIELD_REGION);
168  if (is_null($data)) {
169  return null;
170  }
171  $this->region = (string) $data;
172  }
173 
174  return $this->region;
175  }
176 
183  public function getAuthenticationMode()
184  {
185  if (is_null($this->authenticationMode)) {
187  $data = $this->raw(self::FIELD_AUTHENTICATION_MODE);
188  if (is_null($data)) {
189  return null;
190  }
191  $this->authenticationMode = (string) $data;
192  }
193 
195  }
196 
197 
201  public function setAccessKey(?string $accessKey): void
202  {
203  $this->accessKey = $accessKey;
204  }
205 
209  public function setAccessSecret(?string $accessSecret): void
210  {
211  $this->accessSecret = $accessSecret;
212  }
213 
217  public function setQueueUrl(?string $queueUrl): void
218  {
219  $this->queueUrl = $queueUrl;
220  }
221 
225  public function setRegion(?string $region): void
226  {
227  $this->region = $region;
228  }
229 
233  public function setAuthenticationMode(?string $authenticationMode): void
234  {
235  $this->authenticationMode = $authenticationMode;
236  }
237 }
__construct(?string $accessKey=null, ?string $accessSecret=null, ?string $queueUrl=null, ?string $region=null, ?string $authenticationMode=null, ?string $type=null)