commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
SqsDestinationBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class SqsDestinationBuilder implements Builder
22 {
27  private $accessKey;
28 
33  private $accessSecret;
34 
39  private $queueUrl;
40 
45  private $region;
46 
51  private $authenticationMode;
52 
59  public function getAccessKey()
60  {
61  return $this->accessKey;
62  }
63 
70  public function getAccessSecret()
71  {
72  return $this->accessSecret;
73  }
74 
81  public function getQueueUrl()
82  {
83  return $this->queueUrl;
84  }
85 
92  public function getRegion()
93  {
94  return $this->region;
95  }
96 
103  public function getAuthenticationMode()
104  {
105  return $this->authenticationMode;
106  }
107 
112  public function withAccessKey(?string $accessKey)
113  {
114  $this->accessKey = $accessKey;
115 
116  return $this;
117  }
118 
123  public function withAccessSecret(?string $accessSecret)
124  {
125  $this->accessSecret = $accessSecret;
126 
127  return $this;
128  }
129 
134  public function withQueueUrl(?string $queueUrl)
135  {
136  $this->queueUrl = $queueUrl;
137 
138  return $this;
139  }
140 
145  public function withRegion(?string $region)
146  {
147  $this->region = $region;
148 
149  return $this;
150  }
151 
156  public function withAuthenticationMode(?string $authenticationMode)
157  {
158  $this->authenticationMode = $authenticationMode;
159 
160  return $this;
161  }
162 
163 
164  public function build(): SqsDestination
165  {
166  return new SqsDestinationModel(
167  $this->accessKey,
168  $this->accessSecret,
169  $this->queueUrl,
170  $this->region,
171  $this->authenticationMode
172  );
173  }
174 
175  public static function of(): SqsDestinationBuilder
176  {
177  return new self();
178  }
179 }