commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
EventBridgeDestinationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'EventBridge';
27 protected $type;
28
33 protected $region;
34
39 protected $accountId;
40
45 protected $source;
46
47
51 public function __construct(
52 ?string $region = null,
53 ?string $accountId = null,
54 ?string $source = null,
55 ?string $type = null
56 ) {
57 $this->region = $region;
58 $this->accountId = $accountId;
59 $this->source = $source;
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 getRegion()
88 {
89 if (is_null($this->region)) {
91 $data = $this->raw(self::FIELD_REGION);
92 if (is_null($data)) {
93 return null;
94 }
95 $this->region = (string) $data;
96 }
97
98 return $this->region;
99 }
100
107 public function getAccountId()
108 {
109 if (is_null($this->accountId)) {
111 $data = $this->raw(self::FIELD_ACCOUNT_ID);
112 if (is_null($data)) {
113 return null;
114 }
115 $this->accountId = (string) $data;
116 }
117
118 return $this->accountId;
119 }
120
127 public function getSource()
128 {
129 if (is_null($this->source)) {
131 $data = $this->raw(self::FIELD_SOURCE);
132 if (is_null($data)) {
133 return null;
134 }
135 $this->source = (string) $data;
136 }
137
138 return $this->source;
139 }
140
141
145 public function setRegion(?string $region): void
146 {
147 $this->region = $region;
148 }
149
153 public function setAccountId(?string $accountId): void
154 {
155 $this->accountId = $accountId;
156 }
157
161 public function setSource(?string $source): void
162 {
163 $this->source = $source;
164 }
165}
__construct(?string $region=null, ?string $accountId=null, ?string $source=null, ?string $type=null)