commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SnsDestinationBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class SnsDestinationBuilder implements Builder
22{
27 private $accessKey;
28
33 private $accessSecret;
34
39 private $topicArn;
40
45 private $authenticationMode;
46
53 public function getAccessKey()
54 {
55 return $this->accessKey;
56 }
57
64 public function getAccessSecret()
65 {
66 return $this->accessSecret;
67 }
68
75 public function getTopicArn()
76 {
77 return $this->topicArn;
78 }
79
86 public function getAuthenticationMode()
87 {
88 return $this->authenticationMode;
89 }
90
95 public function withAccessKey(?string $accessKey)
96 {
97 $this->accessKey = $accessKey;
98
99 return $this;
100 }
101
106 public function withAccessSecret(?string $accessSecret)
107 {
108 $this->accessSecret = $accessSecret;
109
110 return $this;
111 }
112
117 public function withTopicArn(?string $topicArn)
118 {
119 $this->topicArn = $topicArn;
120
121 return $this;
122 }
123
128 public function withAuthenticationMode(?string $authenticationMode)
129 {
130 $this->authenticationMode = $authenticationMode;
131
132 return $this;
133 }
134
135
136 public function build(): SnsDestination
137 {
138 return new SnsDestinationModel(
139 $this->accessKey,
140 $this->accessSecret,
141 $this->topicArn,
142 $this->authenticationMode
143 );
144 }
145
146 public static function of(): SnsDestinationBuilder
147 {
148 return new self();
149 }
150}