commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
AWSLambdaDestinationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'AWSLambda';
27 protected $type;
28
33 protected $arn;
34
39 protected $accessKey;
40
45 protected $accessSecret;
46
47
51 public function __construct(
52 ?string $arn = null,
53 ?string $accessKey = null,
54 ?string $accessSecret = null,
55 ?string $type = null
56 ) {
57 $this->arn = $arn;
58 $this->accessKey = $accessKey;
59 $this->accessSecret = $accessSecret;
60 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
61 }
62
67 public function getType()
68 {
69 if (is_null($this->type)) {
71 $data = $this->raw(self::FIELD_TYPE);
72 if (is_null($data)) {
73 return null;
74 }
75 $this->type = (string) $data;
76 }
77
78 return $this->type;
79 }
80
87 public function getArn()
88 {
89 if (is_null($this->arn)) {
91 $data = $this->raw(self::FIELD_ARN);
92 if (is_null($data)) {
93 return null;
94 }
95 $this->arn = (string) $data;
96 }
97
98 return $this->arn;
99 }
100
107 public function getAccessKey()
108 {
109 if (is_null($this->accessKey)) {
111 $data = $this->raw(self::FIELD_ACCESS_KEY);
112 if (is_null($data)) {
113 return null;
114 }
115 $this->accessKey = (string) $data;
116 }
117
118 return $this->accessKey;
119 }
120
127 public function getAccessSecret()
128 {
129 if (is_null($this->accessSecret)) {
131 $data = $this->raw(self::FIELD_ACCESS_SECRET);
132 if (is_null($data)) {
133 return null;
134 }
135 $this->accessSecret = (string) $data;
136 }
137
138 return $this->accessSecret;
139 }
140
141
145 public function setArn(?string $arn): void
146 {
147 $this->arn = $arn;
148 }
149
153 public function setAccessKey(?string $accessKey): void
154 {
155 $this->accessKey = $accessKey;
156 }
157
161 public function setAccessSecret(?string $accessSecret): void
162 {
163 $this->accessSecret = $accessSecret;
164 }
165}
__construct(?string $arn=null, ?string $accessKey=null, ?string $accessSecret=null, ?string $type=null)