commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Subscription
EventBridgeDestinationModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Subscription
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
EventBridgeDestinationModel
extends
JsonObjectModel
implements
EventBridgeDestination
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
}
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel
Definition
EventBridgeDestinationModel.php:21
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
EventBridgeDestinationModel.php:22
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\getAccountId
getAccountId()
Definition
EventBridgeDestinationModel.php:107
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\getSource
getSource()
Definition
EventBridgeDestinationModel.php:127
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\getType
getType()
Definition
EventBridgeDestinationModel.php:67
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\$region
$region
Definition
EventBridgeDestinationModel.php:33
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\$source
$source
Definition
EventBridgeDestinationModel.php:45
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\setAccountId
setAccountId(?string $accountId)
Definition
EventBridgeDestinationModel.php:153
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\setRegion
setRegion(?string $region)
Definition
EventBridgeDestinationModel.php:145
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\setSource
setSource(?string $source)
Definition
EventBridgeDestinationModel.php:161
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\__construct
__construct(?string $region=null, ?string $accountId=null, ?string $source=null, ?string $type=null)
Definition
EventBridgeDestinationModel.php:51
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\getRegion
getRegion()
Definition
EventBridgeDestinationModel.php:87
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\$type
$type
Definition
EventBridgeDestinationModel.php:27
Commercetools\Api\Models\Subscription\EventBridgeDestinationModel\$accountId
$accountId
Definition
EventBridgeDestinationModel.php:39
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Subscription\EventBridgeDestination
Definition
EventBridgeDestination.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Subscription
Definition
AzureEventGridDestination.php:9
Generated by
1.9.8