commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SnsDestinationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'SNS';
27 protected $type;
28
33 protected $accessKey;
34
39 protected $accessSecret;
40
45 protected $topicArn;
46
52
53
57 public function __construct(
58 ?string $accessKey = null,
59 ?string $accessSecret = null,
60 ?string $topicArn = null,
61 ?string $authenticationMode = null,
62 ?string $type = null
63 ) {
64 $this->accessKey = $accessKey;
65 $this->accessSecret = $accessSecret;
66 $this->topicArn = $topicArn;
67 $this->authenticationMode = $authenticationMode;
68 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
69 }
70
75 public function getType()
76 {
77 if (is_null($this->type)) {
79 $data = $this->raw(self::FIELD_TYPE);
80 if (is_null($data)) {
81 return null;
82 }
83 $this->type = (string) $data;
84 }
85
86 return $this->type;
87 }
88
95 public function getAccessKey()
96 {
97 if (is_null($this->accessKey)) {
99 $data = $this->raw(self::FIELD_ACCESS_KEY);
100 if (is_null($data)) {
101 return null;
102 }
103 $this->accessKey = (string) $data;
104 }
105
106 return $this->accessKey;
107 }
108
115 public function getAccessSecret()
116 {
117 if (is_null($this->accessSecret)) {
119 $data = $this->raw(self::FIELD_ACCESS_SECRET);
120 if (is_null($data)) {
121 return null;
122 }
123 $this->accessSecret = (string) $data;
124 }
125
126 return $this->accessSecret;
127 }
128
135 public function getTopicArn()
136 {
137 if (is_null($this->topicArn)) {
139 $data = $this->raw(self::FIELD_TOPIC_ARN);
140 if (is_null($data)) {
141 return null;
142 }
143 $this->topicArn = (string) $data;
144 }
145
146 return $this->topicArn;
147 }
148
155 public function getAuthenticationMode()
156 {
157 if (is_null($this->authenticationMode)) {
159 $data = $this->raw(self::FIELD_AUTHENTICATION_MODE);
160 if (is_null($data)) {
161 return null;
162 }
163 $this->authenticationMode = (string) $data;
164 }
165
167 }
168
169
173 public function setAccessKey(?string $accessKey): void
174 {
175 $this->accessKey = $accessKey;
176 }
177
181 public function setAccessSecret(?string $accessSecret): void
182 {
183 $this->accessSecret = $accessSecret;
184 }
185
189 public function setTopicArn(?string $topicArn): void
190 {
191 $this->topicArn = $topicArn;
192 }
193
197 public function setAuthenticationMode(?string $authenticationMode): void
198 {
199 $this->authenticationMode = $authenticationMode;
200 }
201}
__construct(?string $accessKey=null, ?string $accessSecret=null, ?string $topicArn=null, ?string $authenticationMode=null, ?string $type=null)